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 aMasterKeyProviderto methods inAwsCrypto. This default implementation delegates to a specificMasterKeyProviderspecified 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 DecryptionMaterialsdecryptMaterials(DecryptionMaterialsRequest request)EncryptionMaterialsgetMaterialsForEncrypt(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:CryptoMaterialsManagerPrepares 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:
getMaterialsForEncryptin interfaceCryptoMaterialsManager- Returns:
- See Also:
EncryptionMaterials,EncryptionMaterialsRequest
-
decryptMaterials
public DecryptionMaterials decryptMaterials(DecryptionMaterialsRequest request)
- Specified by:
decryptMaterialsin interfaceCryptoMaterialsManager
-
-