Quantcast
Channel: How can I get a base64 encoded shaX on the cli? - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 6 View Live

Answer by mykhal for How can I get a base64 encoded shaX on the cli?

Base64 encoded SHA256 hash became rather standard file checksum in OpenBSD recently.. It can be done just with adding -b option to the OpenBSD's sha256 (or sha1, sha512) command: $ FILE=/dev/null $...

View Article



Answer by Gilles for How can I get a base64 encoded shaX on the cli?

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 |...

View Article

Answer by Gilles for How can I get a base64 encoded shaX on the cli?

Perl has a base64 module (in the base distribution since 5.7.1). echo foo | sha1sum | \ perl -MMIME::Base64 -ne '/^([[:xdigit:]]+)/ and print encode_base64(pack("H*",$1))' If you have the Digest::SHA...

View Article

Answer by Steven D for How can I get a base64 encoded shaX on the cli?

I'm not completely sure I understand what you want, but I think something like the following should work: $ echo -ne "$(echo -n "message" | sha1sum | cut -f1 -d" " | sed -e 's/\(.\{2\}\)/\\x\1/g')" |...

View Article

Answer by alex for How can I get a base64 encoded shaX on the cli?

Since sha1sum doesn't provide an option for binary output you'll likely need to find an utility which does the opposite of od and pipe them. Taking suggestion by fschmitt to use xxd with 'reverse' and...

View Article


How can I get a base64 encoded shaX on the cli?

sha1sum outputs a hex encoded format of the actual sha. I would like to see a base64 encoded variant. possibly some command that outputs the binary version that I can pipe, like so: echo -n "message"...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images