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
ConstructorsConstructorDescriptionSymmetricStaticProvider(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 theencryptionKeyprovided to the constructor if and only ifmaterialDescriptionis a super-set (may be equal) to thedescriptionprovided to the constructor.getEncryptionMaterials(EncryptionContext context) Returns theencryptionKeyprovided to the constructor.voidrefresh()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 anyCryptographicMaterialsreturned 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 anyCryptographicMaterialsreturned by this object.
-
-
Method Details
-
getDecryptionMaterials
Returns theencryptionKeyprovided to the constructor if and only ifmaterialDescriptionis a super-set (may be equal) to thedescriptionprovided to the constructor.- Specified by:
getDecryptionMaterialsin 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 theencryptionKeyprovided to the constructor.- Specified by:
getEncryptionMaterialsin 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:
refreshin interfaceEncryptionMaterialsProvider
-