Tiny SHA-1 hasher for Node and browsers
npm install tiny-sha1




A tiny, synchronous implementation of the SHA-1 hash function.
Only works on Uint8Array for performance and portability reasons.
``typescript`
export default function sha1(bytes: Uint8Array): string;
`javascript
import sha1 from 'tiny-sha1';
const emptyBuffer = new Uint8Array(0);
const hash = sha1(emptyBuffer);
console.assert(hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709');
``