Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
132 stars 147 forks source link

How is the etag for a Blob calculated? #321

Closed arginite closed 4 years ago

arginite commented 4 years ago

Currently when I download a blob from Azure Storage I'm calculating the MD5 hash of the file to ensure that the downloaded file isn't corrupt. I would prefer to use etag, how is the etag calculated for a blob?

Jinming-Hu commented 4 years ago

Hi @arginite , I'm not quite sure how etag is calculated. I suggest you regard it as an opaque random string. Everytime the blob's content or metadata is changed, the etag changes.