public class Cipher extends java.lang.Object implements BlockCipher
| Constructor and Description |
|---|
Cipher(BlockCipher cipher)
Creates a cipher around a cipher.
|
Cipher(KeyPair senderKeyPair,
KeyPair recipientKeyPair)
Creates a cipher around a sender KeyPair and recipient KeyPair.
|
Cipher(KeyPair senderKeyPair,
KeyPair recipientKeyPair,
CryptoEngine engine)
Creates a cipher around a sender KeyPair and recipient KeyPair.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] input)
Decrypts an arbitrarily-sized message.
|
byte[] |
encrypt(byte[] input)
Encrypts an arbitrarily-sized message.
|
public Cipher(KeyPair senderKeyPair, KeyPair recipientKeyPair)
senderKeyPair - The sender KeyPair. The sender's private key is required for encryption.recipientKeyPair - The recipient KeyPair. The recipient's private key is required for decryption.public Cipher(KeyPair senderKeyPair, KeyPair recipientKeyPair, CryptoEngine engine)
senderKeyPair - The sender KeyPair. The sender's private key is required for encryption.recipientKeyPair - The recipient KeyPair. The recipient's private key is required for decryption.engine - The crypto engine.public Cipher(BlockCipher cipher)
cipher - The cipher.public byte[] encrypt(byte[] input)
BlockCipherencrypt in interface BlockCipherinput - The message to encrypt.public byte[] decrypt(byte[] input)
BlockCipherdecrypt in interface BlockCipherinput - The message to decrypt.