C# Класс Amazon.S3.Encryption.AmazonS3EncryptionClient

This class extends the AmazonS3Client and provides client side encryption when reading or writing S3 objects.
Наследование: AmazonS3Client
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
DecryptObjectUsingInstructionFile void
DecryptObjectUsingMetadata void
GenerateEncryptedObjectRequestUsingInstructionFile void
GenerateEncryptedObjectRequestUsingMetadata void
GenerateEncryptedUploadPartRequest void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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.
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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.
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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.
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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. ///
Результат Amazon.Runtime

AmazonS3EncryptionClient() публичный Метод

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.
Результат Amazon.Runtime

ProcessPreRequestHandlers() защищенный Метод

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
Результат void

ProcessRequestHandlers() защищенный Метод

Adds user agent to headers
protected ProcessRequestHandlers ( IRequest request ) : void
request IRequest
Результат void

ProcessResponseHandlers() защищенный Метод

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
Результат void