Package com.amazonaws.services.s3.model
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.protected
EncryptionMaterials
(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 String
getDescription
(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.boolean
Returns 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
Base constructor for the EncryptionMaterials object. This is not publicly visible since it should not be possible to create an EncryptionMaterials object that contains both an asymmetric key pair and a symmetric key.
-
-
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
Returns a snapshot of the current material description; never null. -
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
-