public abstract class AbstractBlockCipherBean extends AbstractCipherBean
Constructor and Description |
---|
AbstractBlockCipherBean()
Creates a new instance.
|
AbstractBlockCipherBean(KeyStore keyStore,
String keyAlias,
String keyPassword,
Nonce nonce)
Creates a new instance by specifying all properties.
|
Modifier and Type | Method and Description |
---|---|
protected abstract BlockCipherAdapter |
newCipher(CiphertextHeader header,
boolean mode)
Creates a new cipher adapter instance suitable for the block cipher used by this class.
|
protected byte[] |
process(CiphertextHeader header,
boolean mode,
byte[] input)
Processes the given data under the action of the cipher.
|
protected void |
process(CiphertextHeader header,
boolean mode,
InputStream input,
OutputStream output)
Processes the given data under the action of the cipher.
|
decrypt, decrypt, encrypt, encrypt, getKeyAlias, getKeyStore, getNonce, lookupKey, setKeyAlias, setKeyPassword, setKeyStore, setNonce
public AbstractBlockCipherBean()
public AbstractBlockCipherBean(KeyStore keyStore, String keyAlias, String keyPassword, Nonce nonce)
keyStore
- Key store containing encryption key.keyAlias
- Name of encryption key entry in key store.keyPassword
- Password used to decrypt key entry in keystore.nonce
- Nonce/IV generator.protected byte[] process(CiphertextHeader header, boolean mode, byte[] input)
AbstractCipherBean
process
in class AbstractCipherBean
header
- Ciphertext header.mode
- True for encryption; false for decryption.input
- Data to process by cipher.protected void process(CiphertextHeader header, boolean mode, InputStream input, OutputStream output)
AbstractCipherBean
process
in class AbstractCipherBean
header
- Ciphertext header.mode
- True for encryption; false for decryption.input
- Stream containing input data.output
- Stream that receives output of cipher.protected abstract BlockCipherAdapter newCipher(CiphertextHeader header, boolean mode)
header
- Ciphertext header.mode
- True for encryption; false for decryption.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.