Package com.amazonaws.encryptionsdk
Class CryptoResult<T,K extends MasterKey<K>>
java.lang.Object
com.amazonaws.encryptionsdk.CryptoResult<T,K>
- Type Parameters:
T- the type of the underlyingresultK- the type of theMasterKeys used in production of this result
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 Summary
Modifier and TypeMethodDescriptionConvenience method equivalent togetHeaders().getCryptoAlgoId().Convenience method for retrieving the keyIds in the results fromgetMasterKeys().Returns all relevantMasterKeys.The actual result of the cryptographic operation.
-
Method Details
-
getResult
The actual result of the cryptographic operation. This is not a defensive copy and callers should not modify it.- Returns:
-
getMasterKeys
Returns all relevantMasterKeys. In the case of encryption, returns allMasterKeys used to protect the ciphertext. In the case of decryption, returns just theMasterKeyused to decrypt the ciphertext.- Returns:
-
getMasterKeyIds
Convenience method for retrieving the keyIds in the results fromgetMasterKeys(). -
getEncryptionContext
-
getCryptoAlgorithm
Convenience method equivalent togetHeaders().getCryptoAlgoId(). -
getHeaders
-