1.2.2 • Published 2 months ago

hashingstr v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Hashing Strings And Compare

An npm package that can hashing strings and compare string hashes with various algorithms is simple and easy

Installation

Install with npm

npm install hashingstr

Import

With require

const hashingstr = require('hashingstr');

Warning

It is recommended to use the latest version of node or node version 12.0.0 and above because there are several crypto algorithms that do not support node version 12.0.0 and below

Usage

function hash hashingstr.hash(type algorithm, value)

function compare hashingstr.compare(type algorithm, value, hashedValue)

Example to use function hash

hashingstr.hash('md5', 'test');
//result: 098f6bcd4621d373cade4e832627b4f6

Example to use function compare

hashingstr.compare('md5', 'test', '098f6bcd4621d373cade4e832627b4f6');
//result: true

hashingstr.compare('md5', 'tester', '098f6bcd4621d373cade4e832627b4f6');
//result: false

List of supported algorithms

NameAdded in Hashingstr version
md41.2.2
md51.0.0
mdc21.2.2
sha11.0.0
sha2-2241.0.0
sha2-2561.0.0
sha2-3841.0.0
sha2-5121.0.0
sha3-2241.0.0
sha3-2561.0.0
sha3-3841.0.0
sha3-5121.0.0
whirlpool1.0.0
ripemd1.2.2
ripemd1601.0.0
shake1281.1.0
shake2561.1.0
sm31.1.0
blake2b5121.1.0
blake2s2561.1.0
1.2.2

2 months ago

1.1.2

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.0.0

5 months ago