Detalhes do pacote

tiny-sha1

maxdavidson2.8kMIT0.2.1

Tiny SHA-1 hasher for Node and browsers

sha1, sha-1, hash, digest

readme (leia-me)

tiny-sha1

NPM Build Status Coverage Status Dependency Status devDependency Status

A tiny, synchronous implementation of the SHA-1 hash function.

Only works on Uint8Array for performance and portability reasons.

API

export default function sha1(bytes: Uint8Array): string;

Usage

import sha1 from 'tiny-sha1';

const emptyBuffer = new Uint8Array(0);
const hash = sha1(emptyBuffer);

console.assert(hash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709');

changelog (log de mudanças)

Changelog

0.2.0

  • Major performance improvements - now 2-3x faster! 🏎

0.1.0

  • First public release 🎉