Class CryptoResult<T,​K extends MasterKey<K>>

  • Type Parameters:
    T - the type of the underlying result
    K - the type of the MasterKeys used in production of this result

    public class CryptoResult<T,​K extends MasterKey<K>>
    extends Object
    Represents the result of an operation by AwsCrypto. It not only captures the result of the operation but also additional metadata such as the encryptionContext, algorithm, MasterKey(s), and any other information captured in the CiphertextHeaders.
    • Method Detail

      • getResult

        public T getResult()
        The actual result of the cryptographic operation. This is not a defensive copy and callers should not modify it.
        Returns:
      • getMasterKeys

        public List<K> getMasterKeys()
        Returns all relevant MasterKeys. In the case of encryption, returns all MasterKeys used to protect the ciphertext. In the case of decryption, returns just the MasterKey used to decrypt the ciphertext.
        Returns:
      • getMasterKeyIds

        public List<String> getMasterKeyIds()
        Convenience method for retrieving the keyIds in the results from getMasterKeys().
      • getEncryptionContext

        public Map<String,​String> getEncryptionContext()