com.amazonaws.services.s3.model
Class CryptoConfiguration

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

public class CryptoConfiguration
extends java.lang.Object

Stores configuration parameters that will be used during encryption and decryption by the Amazon S3 Encryption Client. With this object, you can set the encryption client to use Instruction Files or Object Metadata for storing encryption information. You can also specify your own crypto provider to be used during encryption and decryption.


Constructor Summary
CryptoConfiguration()
          Creates a new CryptoConfiguration object with default storage mode and crypto provider settings.
CryptoConfiguration(CryptoMode cryptoMode)
           
 
Method Summary
 CryptoMode getCryptoMode()
          Returns the optionally specified crypto mode applicable only to the S3 encryption client; or null.
 java.security.Provider getCryptoProvider()
          Returns the crypto provider whose encryption implementation will be used to encrypt and decrypt data.
 CryptoStorageMode getStorageMode()
          Returns the current storage mode of a CryptoConfiguration object.
 void setCryptoMode(CryptoMode cryptoMode)
          Sets the crypto mode; applicable only to the S3 encryption client.
 void setCryptoProvider(java.security.Provider cryptoProvider)
          Sets the crypto provider to the specified provider.
 void setStorageMode(CryptoStorageMode storageMode)
          Sets the storage mode to the specified mode.
 CryptoConfiguration withCryptoMode(CryptoMode cryptoMode)
          Fluent API to set the crypto mode; applicable only to the S3 encryption client.
 CryptoConfiguration withCryptoProvider(java.security.Provider cryptoProvider)
          Sets the crypto provider to the specified provider, and returns the updated CryptoConfiguration object.
 CryptoConfiguration withStorageMode(CryptoStorageMode storageMode)
          Sets the storage mode to the specified mode, and returns the updated CryptoConfiguration object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptoConfiguration

public CryptoConfiguration()
Creates a new CryptoConfiguration object with default storage mode and crypto provider settings. The default storage mode is the Object Metadata storage mode, and the default crypto provider is the JCE provider.


CryptoConfiguration

public CryptoConfiguration(CryptoMode cryptoMode)
Parameters:
cryptoMode - cryptographic mode to be used
Throws:
java.lang.UnsupportedOperationException - if the necessary security provider cannot be found or the necessary cryptographic operations are not supported for the specified crypto mode.
Method Detail

setStorageMode

public void setStorageMode(CryptoStorageMode storageMode)
Sets the storage mode to the specified mode.

Parameters:
storageMode - The storage mode to be used for storing encryption information.

withStorageMode

public CryptoConfiguration withStorageMode(CryptoStorageMode storageMode)
Sets the storage mode to the specified mode, and returns the updated CryptoConfiguration object.

Parameters:
storageMode - The storage mode to be used for storing encryption information.
Returns:
The updated CryptoConfiguration object.

getStorageMode

public CryptoStorageMode getStorageMode()
Returns the current storage mode of a CryptoConfiguration object.

Returns:
The storage mode to be used for storing encryption information.

setCryptoProvider

public void setCryptoProvider(java.security.Provider cryptoProvider)
Sets the crypto provider to the specified provider.

Parameters:
cryptoProvider - The crypto provider whose encryption implementation will be used to encrypt and decrypt data.

withCryptoProvider

public CryptoConfiguration withCryptoProvider(java.security.Provider cryptoProvider)
Sets the crypto provider to the specified provider, and returns the updated CryptoConfiguration object.

Parameters:
cryptoProvider - The crypto provider whose encryption implementation will be used to encrypt and decrypt data.
Returns:
The updated CryptoConfiguration object.

getCryptoProvider

public java.security.Provider getCryptoProvider()
Returns the crypto provider whose encryption implementation will be used to encrypt and decrypt data.

Returns:
the crypto provider whose encryption implementation will be used to encrypt and decrypt data.

getCryptoMode

public CryptoMode getCryptoMode()
Returns the optionally specified crypto mode applicable only to the S3 encryption client; or null. This attribute is ignored if the S3 encryption client is not in use.


setCryptoMode

public void setCryptoMode(CryptoMode cryptoMode)
Sets the crypto mode; applicable only to the S3 encryption client.

Throws:
java.lang.UnsupportedOperationException - if the necessary security provider cannot be found or the necessary cryptographic operations are not supported for the specified crypto mode.

withCryptoMode

public CryptoConfiguration withCryptoMode(CryptoMode cryptoMode)
Fluent API to set the crypto mode; applicable only to the S3 encryption client.

Throws:
java.lang.UnsupportedOperationException - if the necessary security provider cannot be found or the necessary cryptographic operations are not supported for the specified crypto mode.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.