2

my file test.txt contains

checksum test file

when I upload into blob its md5 is

CONTENT-MD5 cvL65GNcvWFoqZUTI5oscw==

when I run in local md5Sum test.txt its value is

72f2fae4635cbd6168a99513239a2c73

gavisic
  • 59
  • 1
  • 7

1 Answers1

4

As discussed in the comments. Solution from here:

Googled around and found a suggestion to use openssl dgst, and it worked!

openssl dgst -md5 -binary $filename | base64

Turns out, md5sum returns a hex representation of the hash and I had to unhex it before computing its base64:

md5sum --binary $filename | awk '{print $1}' | xxd -p -r | base64

silent
  • 14,494
  • 4
  • 46
  • 86