Interface MasterKey

  • All Known Implementing Classes:
    KmsMasterKey

    public interface MasterKey
    Represents a MasterKey used to encrypt/decrypt Data Key.
    • Method Detail

      • generateDataEncryptionKey

        DataKey generateDataEncryptionKey​(CryptoAlgorithm cryptoAlgorithm)
        Generates a data encryption key (DEK) based on the algorithm provided using this MasterKey.

        The returned DataKey includes a copy of the DEK encrypted under this MasterKey.

        Parameters:
        cryptoAlgorithm -
        Returns:
        DataKey
      • decryptDataKey

        String decryptDataKey​(String encryptedDataKey,
                              String masterKeyId)
        Decrypts and returns data key that was encrypted under this master key.
        Parameters:
        encryptedDataKey -
        masterKeyId -
        Returns:
        Decrypted data key