public class StreamCipher
extends java.lang.Object
implements Cipher
Constructor and Description |
---|
StreamCipher(long seed)
Constructor taking a pseudo-random number seed.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decrypt(java.lang.String encryptedMessage)
Return a one-time pad decryption of the given String encrypted message.
|
java.lang.String |
encrypt(java.lang.String message)
Return a stream cipher encryption of the given String message.
|
public StreamCipher(long seed)
seed
- pseudo-random number seed for stream cipherpublic java.lang.String encrypt(java.lang.String message)
encrypt
in interface Cipher
public java.lang.String decrypt(java.lang.String encryptedMessage)
decrypt
in interface Cipher