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
public class CryptoResult<T,K extends MasterKey<K>> extends Object
Represents the result of an operation byAwsCrypto. It not only captures theresultof the operation but also additional metadata such as theencryptionContext,algorithm,MasterKey(s), and any other information captured in theCiphertextHeaders.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CryptoAlgorithmgetCryptoAlgorithm()Convenience method equivalent togetHeaders().getCryptoAlgoId().Map<String,String>getEncryptionContext()CiphertextHeadersgetHeaders()List<String>getMasterKeyIds()Convenience method for retrieving the keyIds in the results fromgetMasterKeys().List<K>getMasterKeys()Returns all relevantMasterKeys.TgetResult()The actual result of the cryptographic operation.
-
-
-
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 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
public List<String> getMasterKeyIds()
Convenience method for retrieving the keyIds in the results fromgetMasterKeys().
-
getCryptoAlgorithm
public CryptoAlgorithm getCryptoAlgorithm()
Convenience method equivalent togetHeaders().getCryptoAlgoId().
-
getHeaders
public CiphertextHeaders getHeaders()
-
-