public interface CipherBean
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] input)
Decrypts the input data using a block cipher.
|
void |
decrypt(InputStream input,
OutputStream output)
Decrypts the data from the input stream onto the output stream using a symmetric cipher.
|
byte[] |
encrypt(byte[] input)
Encrypts the input data using a symmetric cipher.
|
void |
encrypt(InputStream input,
OutputStream output)
Encrypts the data from the input stream onto the output stream using a symmetric cipher.
|
byte[] encrypt(byte[] input) throws CryptoException
input
- Plaintext data to encrypt.CryptoException
- on underlying cipher data handling errors.void encrypt(InputStream input, OutputStream output) throws CryptoException, StreamException
The caller is responsible for providing and managing the streams (e.g. closing them when finished).
input
- Input stream containing plaintext data to encrypt.output
- Output stream containing ciphertext produced by cipher in encryption mode.CryptoException
- on underlying cipher data handling errors.StreamException
- on stream IO errors.byte[] decrypt(byte[] input) throws CryptoException
input
- Ciphertext data to encrypt.CryptoException
- on underlying cipher data handling errors.void decrypt(InputStream input, OutputStream output) throws CryptoException, StreamException
The caller is responsible for providing and managing the streams (e.g. closing them when finished).
input
- Input stream containing ciphertext data to decrypt.output
- Output stream containing plaintext produced by cipher in decryption mode.CryptoException
- on underlying cipher data handling errors.StreamException
- on stream IO errors.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.