Class EncryptionMaterials
java.lang.Object
com.amazonaws.services.s3.model.EncryptionMaterials
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
KMSEncryptionMaterials
The "key encrypting key" materials used in encrypt/decryption. These
materials may be either an asymmetric key pair or a symmetric key but not
both.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEncryptionMaterials(KeyPair keyPair) Constructs a new EncryptionMaterials object, storing an asymmetric key pair.protectedEncryptionMaterials(KeyPair keyPair, SecretKey symmetricKey) Base constructor for the EncryptionMaterials object.EncryptionMaterials(SecretKey symmetricKey) Constructs a new EncryptionMaterials object, storing a symmetric key. -
Method Summary
Modifier and TypeMethodDescriptionaddDescription(String name, String value) Fluent API to add material description.addDescriptions(Map<String, String> descriptions) Fluent API to add all the given material descriptions.Returns null since the EncryptionMaterials base class does not have a materials accessor.protected StringgetDescription(String name) Returns the key pair stored in this EncryptionMaterials object.Returns a snapshot of the current material description; never null.Returns the symmetric key stored in this EncryptionMaterials object.booleanReturns true if this is a KMS material description; false otherwise.
-
Constructor Details
-
EncryptionMaterials
Constructs a new EncryptionMaterials object, storing an asymmetric key pair.- Parameters:
keyPair- The asymmetric key pair to be stored in this EncryptionMaterials object.
-
EncryptionMaterials
Constructs a new EncryptionMaterials object, storing a symmetric key.- Parameters:
symmetricKey- The symmetric key to be stored in this EncryptionMaterials object.
-
EncryptionMaterials
-
-
Method Details
-
getKeyPair
Returns the key pair stored in this EncryptionMaterials object.- Returns:
- the key pair stored in this EncryptionMaterials object.
-
getSymmetricKey
Returns the symmetric key stored in this EncryptionMaterials object.- Returns:
- the symmetric key stored in this EncryptionMaterials object.
-
getMaterialsDescription
-
getAccessor
Returns null since the EncryptionMaterials base class does not have a materials accessor. Subclasses may override this method.- Returns:
- null
-
addDescription
Fluent API to add material description. -
addDescriptions
Fluent API to add all the given material descriptions. -
isKMSEnabled
public boolean isKMSEnabled()Returns true if this is a KMS material description; false otherwise.- Returns:
- false by default
-
getCustomerMasterKeyId
- Throws:
UnsupportedOperationException- by default
-
getDescription
-