C# Class Amazon.S3.Encryption.AmazonS3EncryptionClient

This class extends the AmazonS3Client and provides client side encryption when reading or writing S3 objects.
Inheritance: AmazonS3Client
Mostrar archivo Open project: scopely/aws-sdk-net Class Usage Examples

Private Properties

Property Type Description
DecryptObjectUsingInstructionFile void
DecryptObjectUsingMetadata void
GenerateEncryptedObjectRequestUsingInstructionFile void
GenerateEncryptedObjectRequestUsingMetadata void
GenerateEncryptedUploadPartRequest void

Public Methods

Method Description
AmazonS3EncryptionClient ( AWSCredentials credentials, Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Credentials, AmazonS3CryptoConfiguration Configuration object and Encryption materials

AmazonS3EncryptionClient ( AWSCredentials credentials, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Credentials and Encryption materials.

AmazonS3EncryptionClient ( AWSCredentials credentials, RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Credentials, Region and Encryption materials

AmazonS3EncryptionClient ( Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with the Encryption materials, AmazonS3 CryptoConfiguration object and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSAccessKey" value="********************"/> <add key="AWSSecretKey" value="****************************************"/> </appSettings> </configuration>

AmazonS3EncryptionClient ( EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSAccessKey" value="********************"/> <add key="AWSSecretKey" value="****************************************"/> </appSettings> </configuration>

AmazonS3EncryptionClient ( RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSAccessKey" value="********************"/> <add key="AWSSecretKey" value="****************************************"/> </appSettings> </configuration>

AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, AmazonS3 CryptoConfiguration object and Encryption materials.

AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key and Encryption materials

AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key, Region and Encryption materials

AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken AmazonS3EncryptionClient CryptoConfiguration object and Encryption materials.

AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken and Encryption materials.

AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken, Region and Encryption materials.

Protected Methods

Method Description
ProcessPreRequestHandlers ( AmazonWebServiceRequest request ) : void

Performs encryption for PutObject and MultiPartUpload, also adding encryption information to object metadata or instruction file

ProcessRequestHandlers ( IRequest request ) : void

Adds user agent to headers

ProcessResponseHandlers ( AmazonWebServiceResponse response, IRequest request, IWebResponseData webResponseData ) : void

Performs decryption of data by getting encryption information from object metadata or instruction file.

Private Methods

Method Description
DecryptObjectUsingInstructionFile ( GetObjectResponse response, GetObjectResponse instructionFileResponse ) : void

Updates object where the object input stream contains the decrypted contents.

DecryptObjectUsingMetadata ( GetObjectResponse objectResponse ) : void

Updates object where the object input stream contains the decrypted contents.

GenerateEncryptedObjectRequestUsingInstructionFile ( PutObjectRequest putObjectRequest ) : void

Updates the request where the instruction file contains encryption information and the input stream contains the encrypted object contents.

GenerateEncryptedObjectRequestUsingMetadata ( PutObjectRequest putObjectRequest ) : void

Updates the request where the metadata contains encryption information and the input stream contains the encrypted object contents.

GenerateEncryptedUploadPartRequest ( UploadPartRequest request ) : void

Updates the request where the input stream contains the encrypted object contents.

Method Details

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Credentials, AmazonS3CryptoConfiguration Configuration object and Encryption materials
public AmazonS3EncryptionClient ( AWSCredentials credentials, Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime
credentials Amazon.Runtime.AWSCredentials AWS Credentials
config Amazon.S3.Encryption.AmazonS3CryptoConfiguration The AmazonS3EncryptionClient CryptoConfiguration Object
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Credentials and Encryption materials.
public AmazonS3EncryptionClient ( AWSCredentials credentials, EncryptionMaterials materials ) : Amazon.Runtime
credentials Amazon.Runtime.AWSCredentials AWS Credentials
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Credentials, Region and Encryption materials
public AmazonS3EncryptionClient ( AWSCredentials credentials, RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime
credentials Amazon.Runtime.AWSCredentials AWS Credentials
region RegionEndpoint The region to connect.
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with the Encryption materials, AmazonS3 CryptoConfiguration object and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSAccessKey" value="********************"/> <add key="AWSSecretKey" value="****************************************"/> </appSettings> </configuration>
public AmazonS3EncryptionClient ( Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime
config Amazon.S3.Encryption.AmazonS3CryptoConfiguration /// The AmazonS3EncryptionClient CryptoConfiguration Object ///
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSAccessKey" value="********************"/> <add key="AWSSecretKey" value="****************************************"/> </appSettings> </configuration>
public AmazonS3EncryptionClient ( EncryptionMaterials materials ) : Amazon.Runtime
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSAccessKey" value="********************"/> <add key="AWSSecretKey" value="****************************************"/> </appSettings> </configuration>
public AmazonS3EncryptionClient ( RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime
region RegionEndpoint /// The region to connect. ///
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, AmazonS3 CryptoConfiguration object and Encryption materials.
public AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
config Amazon.S3.Encryption.AmazonS3CryptoConfiguration The AmazonS3EncryptionClient CryptoConfiguration Object
materials EncryptionMaterials The encryption materials to be used to encrypt and decrypt envelope key.
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key and Encryption materials
public AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, EncryptionMaterials materials ) : Amazon.Runtime
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
materials EncryptionMaterials The encryption materials to be used to encrypt and decrypt envelope key.
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key, Region and Encryption materials
public AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
region RegionEndpoint The region to connect.
materials EncryptionMaterials The encryption materials to be used to encrypt and decrypt envelope key.
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken AmazonS3EncryptionClient CryptoConfiguration object and Encryption materials.
public AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, Amazon.S3.Encryption.AmazonS3CryptoConfiguration config, EncryptionMaterials materials ) : Amazon.Runtime
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
awsSessionToken string AWS Session Token
config Amazon.S3.Encryption.AmazonS3CryptoConfiguration The AmazonS3EncryptionClient CryptoConfiguration Object
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken and Encryption materials.
public AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, EncryptionMaterials materials ) : Amazon.Runtime
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
awsSessionToken string AWS Session Token
materials EncryptionMaterials /// The encryption materials to be used to encrypt and decrypt envelope key. ///
return Amazon.Runtime

AmazonS3EncryptionClient() public method

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken, Region and Encryption materials.
public AmazonS3EncryptionClient ( string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region, EncryptionMaterials materials ) : Amazon.Runtime
awsAccessKeyId string AWS Access Key ID
awsSecretAccessKey string AWS Secret Access Key
awsSessionToken string AWS Session Token
region RegionEndpoint The region to connect.
materials EncryptionMaterials The encryption materials to be used to encrypt and decrypt envelope key.
return Amazon.Runtime

ProcessPreRequestHandlers() protected method

Performs encryption for PutObject and MultiPartUpload, also adding encryption information to object metadata or instruction file
protected ProcessPreRequestHandlers ( AmazonWebServiceRequest request ) : void
request Amazon.Runtime.AmazonWebServiceRequest AmazonWebServiceRequest on which encryption is performed
return void

ProcessRequestHandlers() protected method

Adds user agent to headers
protected ProcessRequestHandlers ( IRequest request ) : void
request IRequest
return void

ProcessResponseHandlers() protected method

Performs decryption of data by getting encryption information from object metadata or instruction file.
protected ProcessResponseHandlers ( AmazonWebServiceResponse response, IRequest request, IWebResponseData webResponseData ) : void
response Amazon.Runtime.AmazonWebServiceResponse AmazonWebServiceResponse on which decryption is performed
request IRequest IRequest
webResponseData IWebResponseData IWebResponseData
return void