Masked Password
Build a flexible password based on datetime .
example
- 'Sunrise in the east.'
- short numeric year
- numeric month
- 'hot summer has come.'
If now is June 2021, the correct password is
'Sunrise in the east.2106hot summer has come.'.
If now is October 2022, the correct password is
'Sunrise in the east.2210hot summer has come.'.
install
npm i maskpassword
npmjs
https://www.npmjs.com/package/maskpassword
github
https://github.com/danwha/MaskPassword
usage
- preparations
-
0-1. require
const MaskPassword = require('maskpassword') or import MaskPassword from 'maskpassword'
-
0-2. class properties
MaskPassword.regularExpression MaskPassword.locale MaskPassword.symbols MaskPassword.enableLongNames MaskPassword.monthNames MaskPassword.weekNames
- creation
- 1-1. receive : <user's rule>
- 1-2. declare & making rule
let ValidMask = new MaskPassword([rule])
- 1-3. checking
ValidMask.isValid()
- 1-4. encrypt
let ruleEncrypt = ValidMask.encryption()
- 1-5. save(aka db)
let storage = ruleEncrypt
- verification
- 2-1. receive : <user's password>
- 2-2. load(aka db) :
- 2-3. decrypt
let ruleStr2 = ValidMask.decryption(storage, password)
CHANGED.md for more.
SeeThank you for your donation.
ETH Wallet : 0x03AA0D76BE8f547244c5A7410674f400142305b0