1.0.2 • Published 1 year ago

@xernois/iut-encrypt v1.0.2

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

IUT_ENCRYPT

ce module est basé sur le module crypto de nodeJs

Chiffrer un message et comparer

const Encrypt = require("@xernois/iut_encrypt")

const hash = Encrypt.sha1("password");

Encrypt.compareSha1 ("password", hash) // -> true
Encrypt.compareSha1("different password", hash) // -> false

Lister les algorithmes

const Encrypt = require("@xernois/iut_encrypt")

Encrypt.algorithmes // string[] => ['sha1', 'sha256', ... , 'md5']