Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

TheWarmFuzzy/auth-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auth-gen

Generates strings using crypto.randomBytes(). Does not use any additional packages to mitigate dependency vulnerabilities.

Installation

npm install auth-gen

Usage

var authGen = require('auth-gen');

uniqueStr

Generates a unique string from a provided length. Optionally you can provide a string of characters to use instead of the default.

authGen.uniqueStr(16) // -> t8yKHADypFe57KsU

authGen.uniqueStr(16, "abcde") // -> bbedeabaeadccead

id

Generates a three-part unique 32 byte id value using the uniqueStr function.

authGen.id() // -> DYYNZYdUBd-9c36jm5hL2-gRNbLBMPuZ

password

Generates a temporary password from a provided length using the uniqueStr function. Adds symbols to the list of valid characters.

authGen.password(16) // -> BrPXuAKqdWg?es=y

About

Crypto-secure id and password generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published