【问题标题】:azure Blob MD5 checksum and local MD5 checksum not matching天蓝色 Blob MD5 校验和与本地 MD5 校验和不匹配
【发布时间】:2020-12-02 04:05:11
【问题描述】:

我的文件 test.txt 包含

checksum test file

当我上传到 blob 时,它的 md5 是

CONTENT-MD5 cvL65GNcvWFoqZUTI5oscw==

当我在本地 md5Sum test.txt 运行时,它的值为

72f2fae4635cbd6168a99513239a2c73

【问题讨论】:

标签: azure blob azure-blob-storage md5sum


【解决方案1】:

如 cmets 中所述。来自here的解决方案:

搜索了一下,发现了一个使用 openssl dgst 的建议,它 成功了!

openssl dgst -md5 -binary $filename | base64

原来,md5sum 返回哈希的十六进制表示,而我有 在计算它的 base64 之前取消十六进制:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-11
    • 2016-01-18
    相关资源
    最近更新 更多