Ejemplo n.º 1
0
            public async Task SetUp()
            {
                await S3Helper.CreateS3Bucket();

                _s3Key = $"myFile_sse-c_{Guid.NewGuid().ToString()}.txt";

                File.WriteAllText(_s3Key, "Hello World!");

                _uploadResponse = await S3Helper.Client.PutObjectAsync(new PutObjectRequest()
                {
                    BucketName = S3Helper.DefaultBucketName,
                    Key        = _s3Key,
                    ServerSideEncryptionMethod = ServerSideEncryptionMethod.AES256,
                    FilePath = _s3Key
                });
            }
Ejemplo n.º 2
0
        public async Task SetUp()
        {
            S3Helper.CreateS3Bucket().Wait();

            _s3Key = $"myFile_sse-c_{Guid.NewGuid().ToString()}.txt";

            File.WriteAllText(_s3Key, "Hello World!");

            _uploadResponse = await S3Helper.Client.PutObjectAsync(new Amazon.S3.Model.PutObjectRequest()
            {
                BucketName = S3Helper.DefaultBucketName,
                Key        = _s3Key,
                ServerSideEncryptionCustomerMethod      = ServerSideEncryptionCustomerMethod.AES256,
                ServerSideEncryptionCustomerProvidedKey = "+X/eQksT7boYpJKb9fcSJYZec7HRxm/y2UKaQEhcqWA=",
                FilePath = _s3Key
            });
        }