sha1

v2.0.1arrow_drop_down
v2.0.1
v2.0.0
v1.0.0
v0.0.1
STATUS
Passing
DOWNLOADS
46
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
6 years ago
SIZE
96 KB
encrypt `data` buffer or string into a sha1 hash
3 contributors
Install sha1 as a package?
Copied
npm i @bit/bit.utils.cryptography.sha1
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
sha1 (
:(string | Buffer),
encoding:string
) : string

encrypt data buffer or string into a sha1 hash

Example
sha1('foo bar') // => '3773dea65156909838fa6c22825cafe090ff8030'
Arguments
(string | Buffer)
encoding: string
Returns
string

sha1 hash

Test Summary

#sha1() should return sha1 hash for string foo bar

Pass

#sha1() should return an empty string in case an empty string was given

Pass
Help and resources