【发布时间】:2017-11-23 05:35:22
【问题描述】:
我可以使用 Azure Key Vault 加密和解密 Microsoft Azure 存储中的 blob,但是否可以使用 Azure 存储数据移动库来做同样的事情。 以下是我与 azure storage 数据移动库一起使用的代码
TransferManager.Configurations.ParallelOperations = 32;
TransferManager.Configurations.BlockSize = 4 * 1024 * 1024;
ServicePointManager.DefaultConnectionLimit = Environment.ProcessorCount * 8;
UploadOptions options = new UploadOptions();
SingleTransferContext context = new SingleTransferContext();
context.SetAttributesCallback = (destination) =>
{
CloudBlob destBlob = destination as CloudBlob;
destBlob.Properties.ContentType = "application/octet-stream";
};
// Start the upload
await TransferManager.UploadAsync(fileToUpload.InputStream, blob, options, context);
【问题讨论】:
标签: azure encryption azure-storage azure-keyvault