Class SymmetricStaticProvider
java.lang.Object
com.amazonaws.services.dynamodbv2.datamodeling.encryption.providers.SymmetricStaticProvider
- All Implemented Interfaces:
EncryptionMaterialsProvider
A provider which always returns the same provided symmetric encryption/decryption key and the
same signing/verification key(s).
- Author:
- Greg Rubin
-
Constructor Summary
ConstructorDescriptionSymmetricStaticProvider
(SecretKey encryptionKey, KeyPair signingPair) SymmetricStaticProvider
(SecretKey encryptionKey, KeyPair signingPair, Map<String, String> description) SymmetricStaticProvider
(SecretKey encryptionKey, SecretKey macKey) -
Method Summary
Modifier and TypeMethodDescriptiongetDecryptionMaterials
(EncryptionContext context) Returns theencryptionKey
provided to the constructor if and only ifmaterialDescription
is a super-set (may be equal) to thedescription
provided to the constructor.getEncryptionMaterials
(EncryptionContext context) Returns theencryptionKey
provided to the constructor.void
refresh()
Does nothing.
-
Constructor Details
-
SymmetricStaticProvider
- Parameters:
encryptionKey
- the value to be returned bygetEncryptionMaterials(EncryptionContext)
andgetDecryptionMaterials(EncryptionContext)
signingPair
- the keypair used to sign/verify the data stored in Dynamo. If only the public key is provided, then this provider may be used for decryption, but not encryption.
-
SymmetricStaticProvider
public SymmetricStaticProvider(SecretKey encryptionKey, KeyPair signingPair, Map<String, String> description) - Parameters:
encryptionKey
- the value to be returned bygetEncryptionMaterials(EncryptionContext)
andgetDecryptionMaterials(EncryptionContext)
signingPair
- the keypair used to sign/verify the data stored in Dynamo. If only the public key is provided, then this provider may be used for decryption, but not encryption.description
- the value to be returned byCryptographicMaterials.getMaterialDescription()
for anyCryptographicMaterials
returned by this object.
-
SymmetricStaticProvider
- Parameters:
encryptionKey
- the value to be returned bygetEncryptionMaterials(EncryptionContext)
andgetDecryptionMaterials(EncryptionContext)
macKey
- the key used to sign/verify the data stored in Dynamo.
-
SymmetricStaticProvider
public SymmetricStaticProvider(SecretKey encryptionKey, SecretKey macKey, Map<String, String> description) - Parameters:
encryptionKey
- the value to be returned bygetEncryptionMaterials(EncryptionContext)
andgetDecryptionMaterials(EncryptionContext)
macKey
- the key used to sign/verify the data stored in Dynamo.description
- the value to be returned byCryptographicMaterials.getMaterialDescription()
for anyCryptographicMaterials
returned by this object.
-
-
Method Details
-
getDecryptionMaterials
Returns theencryptionKey
provided to the constructor if and only ifmaterialDescription
is a super-set (may be equal) to thedescription
provided to the constructor.- Specified by:
getDecryptionMaterials
in interfaceEncryptionMaterialsProvider
- Parameters:
context
- Information to assist in selecting a the proper return value. The implementation is free to determine the minimum necessary for successful processing.- Returns:
- The encryption materials that match the description, or null if no matching encryption materials found.
-
getEncryptionMaterials
Returns theencryptionKey
provided to the constructor.- Specified by:
getEncryptionMaterials
in interfaceEncryptionMaterialsProvider
- Parameters:
context
- Information to assist in selecting a the proper return value. The implementation is free to determine the minimum necessary for successful processing.- Returns:
- EncryptionMaterials which the caller can use to encrypt or decrypt data.
-
refresh
public void refresh()Does nothing.- Specified by:
refresh
in interfaceEncryptionMaterialsProvider
-