BlobRequestOptions.EncryptionPolicy Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the encryption policy for the request.
public Microsoft.Azure.Storage.Blob.BlobEncryptionPolicy EncryptionPolicy { get; set; }
member this.EncryptionPolicy : Microsoft.Azure.Storage.Blob.BlobEncryptionPolicy with get, set
Public Property EncryptionPolicy As BlobEncryptionPolicy
Property Value
An object of type EncryptionPolicy.
Examples
// Create the Key to be used for wrapping.
// This code creates a random encryption key.
SymmetricKey aesKey = new SymmetricKey(kid: "symencryptionkey");
// Create the encryption policy to be used for upload.
BlobEncryptionPolicy uploadPolicy = new BlobEncryptionPolicy(key: aesKey, keyResolver: null);
// Set the encryption policy on the request options.
BlobRequestOptions uploadOptions = new BlobRequestOptions() { EncryptionPolicy = uploadPolicy };
// Encrypt and upload the data to the blob.
MemoryStream stream = new MemoryStream(buffer);
blob.UploadFromStream(stream, length: size, accessCondition: null, options: uploadOptions);
Applies to
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.