simple-sha1

A simple api for generating sha1 hashes in node and the browser.

MIT 17 个版本
安装
npm install simple-sha1
yarn add simple-sha1
pnpm add simple-sha1
bun add simple-sha1
README

simple-sha1

simple-sha1 wraps three fast SHA1 implementations, and exposes a simple api for generating hashes in node (crypto) and the browser (WebCryptoAPI || Rusha).

Build status

Sauce Test Status

install

$ npm install simple-sha1

example

var sha1 = require('simple-sha1')

// Because the WebCryptoAPI uses Promises (shudder),
// you have to pass a callback if you want to take
// advantage of its mad-sick performance.

sha1('hey there', function (hash) {
  console.log(hash)
  > 6b1c01703b68cf9b35ab049385900b5c428651b6
})

// However, if you don’t mind always using Rusha in
// the browser, you can just call sha1.sync and be
// done with it.

console.log(sha1.sync('hey there'))
> 6b1c01703b68cf9b35ab049385900b5c428651b6

license

MIT

版本列表
3.1.0 2021-02-26
3.0.1 2019-09-10
3.0.0 2019-09-05
2.1.2 2019-03-02
2.1.1 2018-05-17
2.1.0 2016-11-23
2.0.8 2016-03-29
2.0.7 2015-01-16
2.0.6 2015-01-15
2.0.5 2015-01-09
2.0.4 2015-01-05
2.0.3 2015-01-05
2.0.2 2015-01-05
2.0.1 2015-01-05
2.0.0 2015-01-05
1.0.3 2015-01-05
1.0.2 2014-11-14