I use .bat (generate.bat) to convert a string to sha256 encoded in base64
<nul set /p =%1 | openssl dgst -sha256 -binary 2>NUL | openssl base64 2>NUL
when I use generate.bat
:
generate.bat foobar
the output is :
qjV6SxGt0Ex4fN0XvaqMGbJCxFVF9ksSlLYfmtCR0G4=
but when I execute :
generate.bat "foobar"
then the output is :
w6uP8Tcg6K2QR905Rms8iXTlksL6OD1KOWBxTK7wxPI=
this means that "foobar"
and foobar
are not the same.
Why ? and what's the difference ?
Thanks