Class EncryptionKeyWrapper

java.lang.Object
org.wso2.securevault.encryption.EncryptionKeyWrapper

public class EncryptionKeyWrapper extends Object
Wraps the encryption key and provide abstraction needed for ciphering.
  • Field Details

    • log

      protected org.apache.commons.logging.Log log
  • Constructor Details

    • EncryptionKeyWrapper

      public EncryptionKeyWrapper()
  • Method Details

    • init

      public void init(SecretInformation secretInformation, String secretKey)
      Initialize the Encryption Key wrapper based on provided SecretInformation
      Parameters:
      secretInformation - The object that has encapsulated all information
      secretKey - 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