1.0.1 • Published 1 year ago

@bafode87/iut-encrypt v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

IUT-ENCRYPT


Module basé sur crypto

Installation

npm i @bafode87/iut-encrypt

Utilisation

Lister des algorithmes que le module peut crypter

const Encrypt = require('@bafode87/iut-encrypt');

Encrypt.algorithms // string => sha1
                   //           sm3
                   //           ...

Crypter un mot de passe et le comparer

const Encrypt = require('@bafode87/iut-encrypt');

const password = 'password';

const hashPassword = Encrypt.sha1(password);

Encrypt.compareSha1(password, hashPassword) // true
Encrypt.compareSha1('wrong password', hashPassword) // false
1.0.1

1 year ago

1.0.0

1 year ago