C# Class Amazon.S3.Encryption.EncryptionUtils

The EncryptionUtils class encrypts and decrypts data stored in S3. It can be used to prepare requests for encryption before they are stored in S3 and to decrypt objects that are retrieved from S3.
Exibir arquivo Open project: aws/aws-sdk-net Class Usage Examples

Private Methods

Method Description
AddUnencryptedContentLengthToMetadata ( PutObjectRequest request ) : void

Adds UnEncrypted content length to object metadata

BuildInstructionsFromObjectMetadata ( GetObjectResponse response, EncryptionMaterials materials ) : EncryptionInstructions

Builds an instruction object from the object metadata.

BuildInstructionsUsingInstructionFile ( GetObjectResponse response, EncryptionMaterials materials ) : EncryptionInstructions

Builds an instruction object from the instruction file.

CreateInstructionFileRequest ( AmazonWebServiceRequest request, EncryptionInstructions instructions ) : PutObjectRequest
DecryptEnvelopeKey ( byte encryptedEnvelopeKey, EncryptionMaterials materials ) : byte[]

Decrypts an encrypted Envelope key using the provided encryption materials and returns it in raw byte array form.

DecryptEnvelopeKeyUsingAsymmetricKeyPair ( AsymmetricAlgorithm asymmetricAlgorithm, byte encryptedEnvelopeKey ) : byte[]
DecryptEnvelopeKeyUsingSymmetricKey ( SymmetricAlgorithm symmetricAlgorithm, byte encryptedEnvelopeKey ) : byte[]
DecryptObjectUsingInstructions ( GetObjectResponse response, EncryptionInstructions instructions ) : void

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

DecryptStream ( Stream encryptedStream, EncryptionInstructions encryptionInstructions ) : Stream
EncryptEnvelopeKey ( byte envelopeKey, EncryptionMaterials materials ) : byte[]
EncryptEnvelopeKeyUsingAsymmetricKeyPair ( AsymmetricAlgorithm asymmetricAlgorithm, byte envelopeKey ) : byte[]
EncryptEnvelopeKeyUsingSymmetricKey ( SymmetricAlgorithm symmetricAlgorithm, byte envelopeKey ) : byte[]
EncryptRequestUsingInstruction ( Stream toBeEncrypted, EncryptionInstructions instructions ) : Stream

Returns an updated stream where the stream contains the encrypted object contents. The specified instruction will be used to encrypt data.

EncryptUploadPartRequestUsingInstructions ( Stream toBeEncrypted, EncryptionInstructions instructions ) : Stream

Returns an updated input stream where the input stream contains the encrypted object contents. The specified instruction will be used to encrypt data.

GenerateInstructions ( EncryptionMaterials materials ) : EncryptionInstructions

Generates an instruction that will be used to encrypt an object.

GetInstructionFileRequest ( GetObjectResponse response ) : GetObjectRequest
IsEncryptionInfoInInstructionFile ( GetObjectResponse response ) : bool

checks if encryption credentials are in the instructionfile

IsEncryptionInfoInMetadata ( GetObjectResponse response ) : bool

checks if encryption credentials are in object metadata

UpdateMetadataWithEncryptionInstructions ( AmazonWebServiceRequest request, EncryptionInstructions instructions ) : void

Update the request's ObjectMetadata with the necessary information for decrypting the object.