Commit a6014bf0 authored by neil's avatar neil
Browse files

support sha1

parent d4d1f0f4
...@@ -334,11 +334,11 @@ _digest() { ...@@ -334,11 +334,11 @@ _digest() {
outputhex="$2" outputhex="$2"
if [ "$alg" = "sha256" ] ; then if [ "$alg" = "sha256" ] || [ "$alg" = "sha1" ]; then
if [ "$outputhex" ] ; then if [ "$outputhex" ] ; then
echo $(openssl dgst -sha256 -hex | cut -d = -f 2) echo $(openssl dgst -$alg -hex | cut -d = -f 2)
else else
openssl dgst -sha256 -binary | _base64 openssl dgst -$alg -binary | _base64
fi fi
else else
_err "$alg is not supported yet" _err "$alg is not supported yet"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment