Class EncryptionMaterials
- java.lang.Object
-
- com.amazonaws.encryptionsdk.model.EncryptionMaterials
-
public final class EncryptionMaterials extends Object
Contains the cryptographic materials needed for an encryption operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EncryptionMaterials.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CryptoAlgorithm
getAlgorithm()
The algorithm to use for this encryption operation.SecretKey
getCleartextDataKey()
The cleartext data key to use for encrypting this message.List<KeyBlob>
getEncryptedDataKeys()
The KeyBlobs to serialize (in cleartext) into the encrypted message.Map<String,String>
getEncryptionContext()
The encryption context to use for the encryption operation.List<MasterKey>
getMasterKeys()
Contains a list of all MasterKeys that could decrypt this message.PrivateKey
getTrailingSignatureKey()
The private key to be used to sign the message trailer.int
hashCode()
static EncryptionMaterials.Builder
newBuilder()
EncryptionMaterials.Builder
toBuilder()
-
-
-
Method Detail
-
toBuilder
public EncryptionMaterials.Builder toBuilder()
-
newBuilder
public static EncryptionMaterials.Builder newBuilder()
-
getAlgorithm
public CryptoAlgorithm getAlgorithm()
The algorithm to use for this encryption operation. Must match the algorithm in EncryptionMaterialsRequest, if that algorithm was non-null.
-
getEncryptionContext
public Map<String,String> getEncryptionContext()
The encryption context to use for the encryption operation. Does not need to match the EncryptionMaterialsRequest.
-
getEncryptedDataKeys
public List<KeyBlob> getEncryptedDataKeys()
The KeyBlobs to serialize (in cleartext) into the encrypted message.
-
getCleartextDataKey
public SecretKey getCleartextDataKey()
The cleartext data key to use for encrypting this message. Note that this is the data key prior to any key derivation required by the crypto algorithm in use.
-
getTrailingSignatureKey
public PrivateKey getTrailingSignatureKey()
The private key to be used to sign the message trailer. Must be present if any only if required by the crypto algorithm, and the key type must likewise match the algorithm in use. Note that it's theCryptoMaterialsManager
's responsibility to find a place to put the public key; typically, this will be in the encryption context, to improve cross-compatibility, but this is not a strict requirement.
-
getMasterKeys
public List<MasterKey> getMasterKeys()
Contains a list of all MasterKeys that could decrypt this message.
-
-