com.amazonaws.services.s3.model
Class EncryptionMaterials

java.lang.Object
  extended by com.amazonaws.services.s3.model.EncryptionMaterials

public class EncryptionMaterials
extends Object

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.


Constructor Summary
  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.
 
Method Summary
 EncryptionMaterialsAccessor getAccessor()
          Returns null since the EncryptionMaterials base class does not have a materials accessor.
 KeyPair getKeyPair()
          Returns the key pair stored in this EncryptionMaterials object.
 Map<String,String> getMaterialsDescription()
          Returns an empty map since the EncryptionMaterials base class does not have extra materials information.
 SecretKey getSymmetricKey()
          Returns the symmetric key stored in this EncryptionMaterials object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptionMaterials

public EncryptionMaterials(KeyPair keyPair)
Constructs a new EncryptionMaterials object, storing an asymmetric key pair.

Parameters:
keyPair - The asymmetric key pair to be stored in this EncryptionMaterials object.

EncryptionMaterials

public EncryptionMaterials(SecretKey symmetricKey)
Constructs a new EncryptionMaterials object, storing a symmetric key.

Parameters:
symmetricKey - The symmetric key to be stored in this EncryptionMaterials object.

EncryptionMaterials

protected EncryptionMaterials(KeyPair keyPair,
                              SecretKey symmetricKey)
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 Detail

getKeyPair

public KeyPair getKeyPair()
Returns the key pair stored in this EncryptionMaterials object.

Returns:
the key pair stored in this EncryptionMaterials object.

getSymmetricKey

public SecretKey getSymmetricKey()
Returns the symmetric key stored in this EncryptionMaterials object.

Returns:
the symmetric key stored in this EncryptionMaterials object.

getMaterialsDescription

public Map<String,String> getMaterialsDescription()
Returns an empty map since the EncryptionMaterials base class does not have extra materials information. Subclasses may override this method.

Returns:
an empty map

getAccessor

public EncryptionMaterialsAccessor getAccessor()
Returns null since the EncryptionMaterials base class does not have a materials accessor. Subclasses may override this method.

Returns:
null


Copyright © 2016. All rights reserved.