public abstract class BaseCipher extends Object implements EncryptionProvider, DecryptionProvider
Modifier and Type | Field and Description |
---|---|
protected KeyStoreWrapper |
keyStoreWrapper |
Modifier | Constructor and Description |
---|---|
protected |
BaseCipher(CipherInformation cipherInformation,
Key key) |
protected |
BaseCipher(CipherInformation cipherInformation,
KeyStoreInformation keystoreInformation) |
protected |
BaseCipher(CipherInformation cipherInformation,
KeyStoreWrapper keyStoreWrapper) |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] cipherText)
Decrypts input cipher bytes
|
byte[] |
encrypt(byte[] plainText)
Encrypts a plain text
|
CipherInformation |
getCipherInformation() |
abstract Key |
getKey(CipherOperationMode operationMode)
Returns the correct key for correct operation
|
KeyStoreInformation |
getKeyStoreInformation() |
protected KeyStoreWrapper keyStoreWrapper
protected BaseCipher(CipherInformation cipherInformation, KeyStoreInformation keystoreInformation)
protected BaseCipher(CipherInformation cipherInformation, KeyStoreWrapper keyStoreWrapper)
protected BaseCipher(CipherInformation cipherInformation, Key key)
public CipherInformation getCipherInformation()
public KeyStoreInformation getKeyStoreInformation()
public abstract Key getKey(CipherOperationMode operationMode)
operationMode
- Ciper operationpublic byte[] encrypt(byte[] plainText)
EncryptionProvider
encrypt
in interface EncryptionProvider
plainText
- as a byte arraypublic byte[] decrypt(byte[] cipherText)
DecryptionProvider
decrypt
in interface DecryptionProvider
cipherText
- as a byte arrayCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.