Package Exports
- password-encrypt-util
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (password-encrypt-util) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Install
npm install password-encrypt-util --save
Example
var Password = require("password-encrypt-util")
//construct with salt
var password = new Password("11@@@test!!!###$$")
//Can't decrypt password (Hash)
var hashPassword = password.getHashPassword("123456")
console.log(hashPassword) //47814c8e288e9f01a232074fbd064201a206e5b0a36d955a2724e589865b9a2f
//encrypt hash with repeat count (more safe)
var hashPasswordWithRepeat = password.getHashPassword("123456", 7) //7 times encrypt repeat
console.log(hashPasswordWithRepeat) //1128e37c59f53accfcea83feebc35b5034a69d9ad74d6257200bf4bb74824bd9
//normal text -> encrypted password (aes-256-cbc)
var encryptedPassword = password.encryptPasswordV2("123456")
console.log(encryptedPassword) //Dg5yvVIWlGufdGnaiAGomA==
//encrypted password ->normal text (aes-256-cbc)
var decryptedPassword = password.decryptPasswordV2(encryptedPassword)
console.log(decryptedPassword) //123456