what is the difference getContentMd5() and getETag() of aws s3 PutObjectResult

An MD5 hash consists of 16 bytes, but they are not all printable characters.

  • The ETag is the md5 hash, hex-encoded (not base64, as the question suggests) — hex encoding uses 32 characters to encode 16 bytes.
  • Meanwhile, Content-MD5 is the md5 hash, base64 encoded, which uses 24 characters to encode 16 bytes.

答案来源-stackoverflow

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.