public class EncryptionMaterials extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
|
EncryptionMaterials(KeyPair keyPair)
Constructs a new EncryptionMaterials object, storing an asymmetric key pair.
|
protected |
EncryptionMaterials(KeyPair keyPair,
SecretKey symmetricKey)
Base constructor for the EncryptionMaterials object.
|
|
EncryptionMaterials(SecretKey symmetricKey)
Constructs a new EncryptionMaterials object, storing a symmetric key.
|
Modifier and Type | Method and Description |
---|---|
EncryptionMaterials |
addDescription(String name,
String value)
Fluent API to add material description.
|
EncryptionMaterials |
addDescriptions(Map<String,String> descriptions)
Fluent API to add all the given material descriptions.
|
EncryptionMaterialsAccessor |
getAccessor()
Returns null since the EncryptionMaterials base class does not have a materials accessor.
|
String |
getCustomerMasterKeyId() |
protected String |
getDescription(String name) |
KeyPair |
getKeyPair()
Returns the key pair stored in this EncryptionMaterials object.
|
Map<String,String> |
getMaterialsDescription()
Returns a snapshot of the current material description; never null.
|
SecretKey |
getSymmetricKey()
Returns the symmetric key stored in this EncryptionMaterials object.
|
boolean |
isKMSEnabled()
Returns true if this is a KMS material description; false otherwise.
|
public EncryptionMaterials(KeyPair keyPair)
keyPair
- The asymmetric key pair to be stored in this EncryptionMaterials object.public EncryptionMaterials(SecretKey symmetricKey)
symmetricKey
- The symmetric key to be stored in this EncryptionMaterials object.protected EncryptionMaterials(KeyPair keyPair, SecretKey symmetricKey)
public KeyPair getKeyPair()
public SecretKey getSymmetricKey()
public Map<String,String> getMaterialsDescription()
public EncryptionMaterialsAccessor getAccessor()
public EncryptionMaterials addDescription(String name, String value)
public EncryptionMaterials addDescriptions(Map<String,String> descriptions)
public boolean isKMSEnabled()
public String getCustomerMasterKeyId()
UnsupportedOperationException
- by defaultCopyright © 2023. All rights reserved.