azure - azure Blob MD5 checksum and local MD5 checksum not matching
问题描述
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
解决方案
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
推荐阅读
- python - 无法在俄语/乌克兰语中解码 Python 错误
- maven - mvn clean install - pljava 部署错误 - 需要帮助
- python - 如何从 MLflow 中删除 run_id
- javascript - Firebase 云功能上的预检错误
- google-oauth - 允许来自两个域(例如 example.com、example.org)的用户使用 Google 的 OAuth2 进行授权
- shell - 将 < 或 > 传递给 shell 命令?
- gitlab - Gitlab-ci 管道中“工作流程:规则”的目的是什么?
- r - 通过 Rstudio 中的“作业”选项卡安装 R 包
- react-native - React Native Axios 请求正在冻结 UI
- json - 我如何把它变成一个json?