Loadable Function: hash = SHA1(byte_stream
Loadable Function: hash = SHA1(byte_stream, hash_initial)

SHA1 implements the Secure Hash Algorithm Cryptographic Hashing (One-Way) function. (FIPS PUB 180-1)

hash is a Row Vector of 20 byte values

hash_initial default is 67452301 EFCDAB89 98BADCFE 10325476 C3D2E1F0

Note: while it is possible to create a "poor-man’s" MAC (message authenticity code) by setting hash_initial to a private value, it is better to use an algorithm like HMAC.

HMAC = SHA1( [ passcode, SHA1( [passcode, data ] ) );

Package: general