base64 encoded hash bytes

There are a number of places where you want a base64 encoded version of some kind of hash. Sometimes people wind up base64 encoding the hex string instead of the bytes, which is gross.

echo -n 'passphrase' |\  
sha512sum |\  
awk '{print $1}' |\  
xxd -r -p |\  
base64 -w 0  

Replace sha512sum with the CLI hasher of your choosing, and adjust (or remove) awk as needed.