Package com.amazonaws.encryptionsdk
Class DefaultCryptoMaterialsManager
- java.lang.Object
-
- com.amazonaws.encryptionsdk.DefaultCryptoMaterialsManager
-
- All Implemented Interfaces:
CryptoMaterialsManager
public class DefaultCryptoMaterialsManager extends Object implements CryptoMaterialsManager
The default implementation ofCryptoMaterialsManager
, used implicitly when passing aMasterKeyProvider
to methods inAwsCrypto
.This default implementation delegates to a specific
MasterKeyProvider
specified at construction time. It also handles generating trailing signature keys when needed, placing them in the encryption context (and extracting them at decrypt time).
-
-
Constructor Summary
Constructors Constructor Description DefaultCryptoMaterialsManager(MasterKeyProvider<?> mkp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecryptionMaterials
decryptMaterials(DecryptionMaterialsRequest request)
EncryptionMaterials
getMaterialsForEncrypt(EncryptionMaterialsRequest request)
Prepares materials for an encrypt request.
-
-
-
Constructor Detail
-
DefaultCryptoMaterialsManager
public DefaultCryptoMaterialsManager(MasterKeyProvider<?> mkp)
- Parameters:
mkp
- The master key provider to delegate to
-
-
Method Detail
-
getMaterialsForEncrypt
public EncryptionMaterials getMaterialsForEncrypt(EncryptionMaterialsRequest request)
Description copied from interface:CryptoMaterialsManager
Prepares materials for an encrypt request. The resulting materials result must have a cleartext data key and (if applicable for the crypto algorithm in use) a trailing signature key.The encryption context returned may be different from the one passed in the materials request, and will be serialized (in cleartext) within the encrypted message.
- Specified by:
getMaterialsForEncrypt
in interfaceCryptoMaterialsManager
- Returns:
- See Also:
EncryptionMaterials
,EncryptionMaterialsRequest
-
decryptMaterials
public DecryptionMaterials decryptMaterials(DecryptionMaterialsRequest request)
- Specified by:
decryptMaterials
in interfaceCryptoMaterialsManager
-
-