Given a string in linux str, how can I calculate SHA256 (in size of 32 bytes) of this string ?
I looking for a way such then if I will compare this result to openssl dgst -sha256 str.txt (Assuming the file str.txt contains the string str).
I know that sha256sum do it, but i don't sure how to require the result to be 32 bytes.