If you have the command line utility from OpenSSL, it can produce a digest in binary form, and it can even translate to base64 (in a separate invocation).
echo -n foo | openssl dgst -binary -sha1 | openssl base64
If you have the command line utility from OpenSSL, it can produce a digest in binary form, and it can even translate to base64 (in a separate invocation).
echo -n foo | openssl dgst -binary -sha1 | openssl base64