sha1-hash-and-verify
v1.0.4
Published
This package is used for sha1 hashing and verifying the hashed data
Downloads
97
Maintainers
Readme
sha1-hash-and-verify
Secure Hash Algorithm 1 is a cryptographic hash function which generates a hash value which is typically rendered as a hexadecimal number of exactly 40 digits long. It produces a 160-bit hash value which is known as message digest.
npm i sha1-hash-and-verify
- sha1 hashing
const {sha1}=require("sha1-hash-and-verify");
const hashedData=sha1("password");
console.log(hashedData);
- output
5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8
- verify
const {sha1,verifyHash}=require("sha1-hash-and-verify");
const hashedData=sha1("password");
const match=verifyHash("password",hashedData);
console.log(match);
- output
true
- Supports TypeScript
import {sha1} from "sha1-hash-and-verify";
const hashedData=sha1("password");
console.log(hashedData);