public static void Initialize(TestContext a) { s3EncryptionClientMetadataMode = new AmazonS3EncryptionClient(encryptionMaterials); RetryUtilities.ForceConfigureClient(s3EncryptionClientMetadataMode); AmazonS3CryptoConfiguration config = new AmazonS3CryptoConfiguration() { StorageMode = CryptoStorageMode.InstructionFile }; s3EncryptionClientFileMode = new AmazonS3EncryptionClient(config, encryptionMaterials); RetryUtilities.ForceConfigureClient(s3EncryptionClientFileMode); using (StreamWriter writer = File.CreateText(fileName)) { writer.Write(sampleContent); } bucketName = S3TestUtils.CreateBucket(s3EncryptionClientFileMode); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Access Key ID, /// AWS Secret Key and Encryption materials /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="materials">The encryption materials to be used to encrypt and decrypt envelope key.</param> public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, EncryptionMaterials materials) : base(awsAccessKeyId, awsSecretAccessKey) { this.encryptionMaterials = materials; amazonS3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Credentials, AmazonS3CryptoConfiguration Configuration object /// and Encryption materials /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="config">The AmazonS3EncryptionClient CryptoConfiguration Object</param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(AWSCredentials credentials, AmazonS3CryptoConfiguration config, EncryptionMaterials materials) : base(credentials, config) { this.encryptionMaterials = materials; amazonS3CryptoConfig = config; }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Credentials and Encryption materials. /// </summary> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> /// <param name="credentials">AWS Credentials</param> public AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterials materials) : base(credentials) { this.encryptionMaterials = materials; amazonS3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// 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. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// </code> /// /// </summary> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(EncryptionMaterials materials) : base() { this.EncryptionMaterials = materials; S3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken /// AmazonS3EncryptionClient CryptoConfiguration object and Encryption materials. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> /// <param name="config">The AmazonS3EncryptionClient CryptoConfiguration Object</param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonS3CryptoConfiguration config, EncryptionMaterials materials) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, config) { this.EncryptionMaterials = materials; S3CryptoConfig = config; }
/// <summary> /// 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. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// </code> /// /// </summary> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(EncryptionMaterials materials) : base() { this.encryptionMaterials = materials; amazonS3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Credentials, AmazonS3CryptoConfiguration Configuration object /// and Encryption materials /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="config">The AmazonS3EncryptionClient CryptoConfiguration Object</param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(AWSCredentials credentials, AmazonS3CryptoConfiguration config, EncryptionMaterials materials) : base(credentials, config) { this.EncryptionMaterials = materials; S3CryptoConfig = config; }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Credentials, Region and Encryption materials /// </summary> /// <param name="credentials">AWS Credentials</param> /// <param name="region">The region to connect.</param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(AWSCredentials credentials, RegionEndpoint region, EncryptionMaterials materials) : base(credentials, region) { this.EncryptionMaterials = materials; S3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// 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. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// </code> /// /// </summary> /// <param name="config"> /// The AmazonS3EncryptionClient CryptoConfiguration Object /// </param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(AmazonS3CryptoConfiguration config, EncryptionMaterials materials) : base(config) { this.EncryptionMaterials = materials; S3CryptoConfig = config; }
/// <summary> /// 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. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSAccessKey" value="********************"/> /// <add key="AWSSecretKey" value="****************************************"/> /// </appSettings> /// </configuration> /// </code> /// /// </summary> /// <param name="region"> /// The region to connect. /// </param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(RegionEndpoint region, EncryptionMaterials materials) : base(region) { this.encryptionMaterials = materials; amazonS3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, /// SessionToken, Region and Encryption materials. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> /// <param name="region">The region to connect.</param> /// <param name="materials">The encryption materials to be used to encrypt and decrypt envelope key.</param> public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region, EncryptionMaterials materials) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, region) { this.encryptionMaterials = materials; amazonS3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Access Key ID, /// AWS Secret Key and Encryption materials /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="materials">The encryption materials to be used to encrypt and decrypt envelope key.</param> public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, EncryptionMaterials materials) : base(awsAccessKeyId, awsSecretAccessKey) { this.EncryptionMaterials = materials; S3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken /// AmazonS3EncryptionClient CryptoConfiguration object and Encryption materials. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> /// <param name="config">The AmazonS3EncryptionClient CryptoConfiguration Object</param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonS3CryptoConfiguration config, EncryptionMaterials materials) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, config) { this.encryptionMaterials = materials; amazonS3CryptoConfig = config; }
/// <summary> /// Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, /// SessionToken, Region and Encryption materials. /// </summary> /// <param name="awsAccessKeyId">AWS Access Key ID</param> /// <param name="awsSecretAccessKey">AWS Secret Access Key</param> /// <param name="awsSessionToken">AWS Session Token</param> /// <param name="region">The region to connect.</param> /// <param name="materials">The encryption materials to be used to encrypt and decrypt envelope key.</param> public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region, EncryptionMaterials materials) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, region) { this.EncryptionMaterials = materials; S3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// 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. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// </code> /// /// </summary> /// <param name="region"> /// The region to connect. /// </param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(RegionEndpoint region, EncryptionMaterials materials) : base(region) { this.encryptionMaterials = materials; amazonS3CryptoConfig = new AmazonS3CryptoConfiguration(); }
/// <summary> /// 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. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSAccessKey" value="********************"/> /// <add key="AWSSecretKey" value="****************************************"/> /// </appSettings> /// </configuration> /// </code> /// /// </summary> /// <param name="config"> /// The AmazonS3EncryptionClient CryptoConfiguration Object /// </param> /// <param name="materials"> /// The encryption materials to be used to encrypt and decrypt envelope key. /// </param> public AmazonS3EncryptionClient(AmazonS3CryptoConfiguration config, EncryptionMaterials materials) : base(config) { this.encryptionMaterials = materials; amazonS3CryptoConfig = config; }