#!/usr/bin/env bash # From # e.g. https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/shs/shabytetestvectors.zip # shabytetestvectors/SHA1ShortMsg (for Len <= 512) # shabytetestvectors/SHA1LongMsg (for Len >= 1304) # # NOTE: the first test of SHA1ShortMsg file is wrong, since it asserts Len = 0 but a Msg of length 1, so I fixed it here. # On OS X, we need to explicitly use GNU sed SED=$(if which gsed 2>/dev/null ; then echo gsed ; else echo sed ; fi) { cat <