public class DefaultCryptoMaterialsManager extends Object implements CryptoMaterialsManager
CryptoMaterialsManager
, used implicitly when passing a
MasterKeyProvider
to methods in AwsCrypto
.
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 and Description |
---|
DefaultCryptoMaterialsManager(MasterKeyProvider<?> mkp) |
Modifier and Type | Method and Description |
---|---|
DecryptionMaterials |
decryptMaterials(DecryptionMaterialsRequest request) |
EncryptionMaterials |
getMaterialsForEncrypt(EncryptionMaterialsRequest request)
Prepares materials for an encrypt request.
|
public DefaultCryptoMaterialsManager(MasterKeyProvider<?> mkp)
mkp
- The master key provider to delegate topublic EncryptionMaterials getMaterialsForEncrypt(EncryptionMaterialsRequest request)
CryptoMaterialsManager
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.
getMaterialsForEncrypt
in interface CryptoMaterialsManager
EncryptionMaterials
,
EncryptionMaterialsRequest
public DecryptionMaterials decryptMaterials(DecryptionMaterialsRequest request)
decryptMaterials
in interface CryptoMaterialsManager
Copyright © 2023. All rights reserved.