8
如何使用OpenSSL從命令行生成SHA-512哈希而不使用文件?OpenSSL從shell stdin創建SHA哈希
我已經試過這
echo "password" | openssl dgst -sha512
但哈希查找錯誤的(與http://hash.online-convert.com/sha512-generator相比)。
如何使用OpenSSL從命令行生成SHA-512哈希而不使用文件?OpenSSL從shell stdin創建SHA哈希
我已經試過這
echo "password" | openssl dgst -sha512
但哈希查找錯誤的(與http://hash.online-convert.com/sha512-generator相比)。
嘗試echo -n "password"
。
發生什麼事情是echo
添加到字符串末尾的新行字符正在變得散列。 -n
到echo
可以抑制這種行爲。