public class SymmetricStaticProvider extends java.lang.Object implements EncryptionMaterialsProvider
| Constructor and Description |
|---|
SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
java.security.KeyPair signingPair) |
SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
java.security.KeyPair signingPair,
java.util.Map<java.lang.String,java.lang.String> description) |
SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
javax.crypto.SecretKey macKey) |
SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
javax.crypto.SecretKey macKey,
java.util.Map<java.lang.String,java.lang.String> description) |
| Modifier and Type | Method and Description |
|---|---|
DecryptionMaterials |
getDecryptionMaterials(EncryptionContext context)
Returns the
encryptionKey provided to the constructor if and only if
materialDescription is a super-set (may be equal) to the description
provided to the constructor. |
EncryptionMaterials |
getEncryptionMaterials(EncryptionContext context)
Returns the
encryptionKey provided to the constructor. |
void |
refresh()
Does nothing.
|
public SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
java.security.KeyPair signingPair)
encryptionKey - the value to be returned by getEncryptionMaterials(EncryptionContext) and getDecryptionMaterials(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.public SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
java.security.KeyPair signingPair,
java.util.Map<java.lang.String,java.lang.String> description)
encryptionKey - the value to be returned by getEncryptionMaterials(EncryptionContext) and getDecryptionMaterials(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 by CryptographicMaterials.getMaterialDescription() for any CryptographicMaterials
returned by this object.public SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
javax.crypto.SecretKey macKey)
encryptionKey - the value to be returned by getEncryptionMaterials(EncryptionContext) and getDecryptionMaterials(EncryptionContext)macKey - the key used to sign/verify the data stored in Dynamo.public SymmetricStaticProvider(javax.crypto.SecretKey encryptionKey,
javax.crypto.SecretKey macKey,
java.util.Map<java.lang.String,java.lang.String> description)
encryptionKey - the value to be returned by getEncryptionMaterials(EncryptionContext) and getDecryptionMaterials(EncryptionContext)macKey - the key used to sign/verify the data stored in Dynamo.description - the value to be returned by CryptographicMaterials.getMaterialDescription() for any CryptographicMaterials
returned by this object.public DecryptionMaterials getDecryptionMaterials(EncryptionContext context)
encryptionKey provided to the constructor if and only if
materialDescription is a super-set (may be equal) to the description
provided to the constructor.getDecryptionMaterials in interface EncryptionMaterialsProvidercontext - Information to assist in selecting a the proper return value. The implementation
is free to determine the minimum necessary for successful processing.public EncryptionMaterials getEncryptionMaterials(EncryptionContext context)
encryptionKey provided to the constructor.getEncryptionMaterials in interface EncryptionMaterialsProvidercontext - Information to assist in selecting a the proper return value. The implementation
is free to determine the minimum necessary for successful processing.public void refresh()
refresh in interface EncryptionMaterialsProvider