GeSHi Source Viewer: sri-hash.batView Raw


  1. @echo off
  2. set bits=384
  3. set file=%1
  4. for /F "tokens=* USEBACKQ" %%a in (`openssl dgst -sha%bits% -binary %file% ^| openssl base64 -A`) do set hash=%%a
  5. echo sha%bits%-%hash%