Package org.wso2.securevault.encryption
Class EncryptionKeyWrapper
java.lang.Object
org.wso2.securevault.encryption.EncryptionKeyWrapper
Wraps the encryption key and provide abstraction needed for ciphering.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the secret key based on initialization datavoidinit(SecretInformation secretInformation, String secretKey) Initialize the Encryption Key wrapper based on provided SecretInformation
-
Field Details
-
log
protected org.apache.commons.logging.Log log
-
-
Constructor Details
-
EncryptionKeyWrapper
public EncryptionKeyWrapper()
-
-
Method Details
-
init
Initialize the Encryption Key wrapper based on provided SecretInformation- Parameters:
secretInformation- The object that has encapsulated all informationsecretKey- The secret key used for encryption
-
getSecretKeyBytes
public byte[] getSecretKeyBytes()Returns the secret key based on initialization data- Returns:
- keyBytes if there is a one, otherwise null
- Throws:
SecureVaultException- if key validation fails
-