Package org.cryptacular.pbe
Interface EncryptionScheme
- All Known Implementing Classes:
AbstractEncryptionScheme
,OpenSSLEncryptionScheme
,PBES1EncryptionScheme
,PBES2EncryptionScheme
public interface EncryptionScheme
Describes a password-based encryption scheme.
- Version:
- $Revision: 2744 $
- Author:
- Middleware Services
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
decrypt
(byte[] ciphertext) Decrypts the given ciphertext into plaintext using the derived key.void
decrypt
(InputStream in, OutputStream out) Decrypts ciphertext from an input stream into plaintext in the output stream.byte[]
encrypt
(byte[] plaintext) Encrypts the given plaintext bytes into a byte array of ciphertext using the derived key.void
encrypt
(InputStream in, OutputStream out) Encrypts the data in the given plaintext input stream into ciphertext in the output stream.
-
Method Details
-
encrypt
byte[] encrypt(byte[] plaintext) Encrypts the given plaintext bytes into a byte array of ciphertext using the derived key.- Parameters:
plaintext
- Input plaintext bytes.- Returns:
- Ciphertext resulting from plaintext encryption.
-
encrypt
Encrypts the data in the given plaintext input stream into ciphertext in the output stream. UseEncodingOutputStream
to produce ciphertext bytes that encoded as a string data in the output stream.- Parameters:
in
- Input stream of plaintext.out
- Output stream of ciphertext.- Throws:
IOException
- On stream read/write errors.
-
decrypt
byte[] decrypt(byte[] ciphertext) Decrypts the given ciphertext into plaintext using the derived key.- Parameters:
ciphertext
- Input ciphertext bytes.- Returns:
- Plaintext resulting from ciphertext decryption.
-
decrypt
Decrypts ciphertext from an input stream into plaintext in the output stream. UseDecodingInputStream
to handle input ciphertext encoded as string data.- Parameters:
in
- Input stream of ciphertext.out
- Output stream of plaintext.- Throws:
IOException
- On stream read/write errors.
-