Generate ultrastrong user passwords and auth tokens
yarn add password-magic --save
- Full asynchronous operation
- Generate Random User Passwords
- Random Number Sequences of arbitrary length
- Random Pin Numbers (4 Digits)
- Remarkable Human Passwords (nato+greek alphabet)
- Human passwords/tokens only uses easy readable chars (
landiare avoided) - Alphnumerical Tokens
- Node.js crypto API is used to generate uniformly-distributed random numbers
- numbers - Random Number Sequences of arbitrary length
- pin - Creates a 4 digit numerical code
- internet - Strong passphrases especially used for web services/accounts/wifi
- server - Ultrastrong passphrases especially used for servers
- humanShort - Remarkable passwords including greek+nato alphabet
- token - Alphnumerical Standard Tokens
Description: Random Number Sequences of arbitrary length
Syntax:sequence:string = numbers([length:int = 8])
Output:9071248216498
Arguments:
- length:int - length of the generated sequence
Example:
const_pwMagic=require('./password-magic');for(leti=0;i<10;i++){console.log('Numbers',await_pwMagic.numbers());}Description: Creates a 4 digit numerical code
Syntax:sequence:string = pin()
Output:0981
Description: Strong passphrases especially used for web services/accounts or wifi
Syntax:sequence:string = internet([length:int = 22], [shuffle:boolean = false])
Output:brGK98]~hkhyNE79_?297
Arguments:
- length:int - length of the generated sequence
- shuffle:boolean - flag to enable character position shuffle (random positions)
Example:
constpw1=await_pwMagic.internet();// brGK98]~hkhyNE79_?297constpw2=await_pwMagic.internet(50,true);// 62p6u4dS934HssJ9*8BMa!(NN}q}384Udoc2F!)8%§5!D7psYLDescription: Ultrastrong passphrases especially used for servers
Syntax:sequence:string = server([length:int = 20])
Output:v~8)yyk§HMKU§HBg&%#w
Arguments:
- length:int - length of the generated sequence
Example:
constpw1=await_pwMagic.server(25);// v~8)yyk§HMKU§HBg&%#wyDS9FDescription: Remarkable passphrases especially used for web services/accounts with multifactor auth
Syntax:sequence:string = humanShort()
Output:foxtrot5SIERRA,four]03pm
Example:
constpw1=await_pwMagic.humanShort();// foxtrot5SIERRA,four]03pmDescription: Alphnumerical Standard Tokens
Syntax:sequence:string = token([length:int = 20])
Output:l4J4rK9v62MUGBstbgh0XyQUQ
Arguments:
- length:int - length of the generated sequence
Example:
constpw1=await_pwMagic.token(50);// Q49hIVylOKI1ixUe5FLliIsUEbASHWXjFRBEBPs6zcoog0JFnezOvS6HJWahQhcaPlease open a new issue on GitHub
password-magic is OpenSource and licensed under the Terms of The MIT License