当设置某个参数(bool encrypt=true
)时,文件将上传到带有 key 保管库加密的Azure存储帐户,用户可以灵活地更改该参数值,并且文件可以上传时不进行任何加密(bool encrypt=false
)。
Azure 中的同一存储帐户中可能存在加密和未加密的文件。
So, while downloading a file how can i get to know that the file is encrypted and i don't need to decrypt it.
最佳答案
there is a possibility of having encrypted and unencrypted file in the same storage account in Azure.
是的,我们可以根据需要加密或解密 blob。
So, while downloading a file how can i get to know that the file is encrypted and i don't need to decrypt it.
如果 blob 通过 keyvault 加密,则 blob 中会有一个加密数据元数据。您可以引用本教程获取有关如何Encrypt and decrypt blobs in Microsoft Azure Storage using Azure Key Vault的更多信息
blob.FetchAttributes();
if (blob.Metadata.ContainsKey("encryptiondata"))
{
var encryptiondataVaule = blob.Metadata["encryptiondata"];
// check to encryptiondataVaule then add your logic here
}
else
{
// the blob is not encrypted by azure keyvault
}
关于azure - 如何检查 Azure 存储文件是否已 Key-Vault 加密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47674717/