BlobRequestOptions.EncryptionPolicy プロパティ

定義

要求の暗号化ポリシーを取得または設定します。

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

プロパティ値

EncryptionPolicy 型のオブジェクト。


// 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);

適用対象