password-generator-lite is a lightweight JavaScript library for cryptographic hashing, extraction, and transformation of strings. It provides functions for concatenating strings, computing SHA256 hashes, extracting numbers and letters, combining alphanumeric passwords, calculating string hashes, and transforming strings by converting lowercase letters to uppercase, and replacing the first alphanumeric character with a random sign.
You can install password-generator-lite via npm:
npm install password-generator-lite
-
import { concatenateAndHash } from 'password-generator-lite'; let textA = "text1" let textB = "text2" let textArr = [textA, textB] let output1 = concatenateAndHash(textA) let output2 = concatenateAndHash(textArr)
-
import { extractNumbers } from 'password-generator-lite'; let numberOfCharacters = 8 //defult let textA = "text1" let textB = "text2" let textArr = [textA, textB] let output1 = extractNumbers(textA) let output2 = extractNumbers(textArr) let output1 = extractNumbers(textA, numberOfCharacters) let output2 = extractNumbers(textArr, numberOfCharacters)
-
import { extractLetters } from 'password-generator-lite'; let numberOfCharacters = 8 //defult let textA = "text1" let textB = "text2" let textArr = [textA, textB] let output1 = extractLetters(textA) let output2 = extractLetters(textArr) let output1 = extractLetters(textA, numberOfCharacters) let output2 = extractLetters(textArr, numberOfCharacters)
-
import { combineNumbersAndLetters } from 'password-generator-lite'; let numberOfCharacters = 8 //defult let textA = "text1" let textB = "text2" let textArr = [textA, textB] let output1 = combineNumbersAndLetters(textA) let output2 = combineNumbersAndLetters(textArr) let output1 = combineNumbersAndLetters(textA, numberOfCharacters) let output2 = combineNumbersAndLetters(textArr, numberOfCharacters)
-
import { transformToUpperCase } from 'password-generator-lite'; let numberOfCharacters = 8 //defult let textA = "text1" let textB = "text2" let textArr = [textA, textB] let output1 = transformToUpperCase(textA) let output2 = transformToUpperCase(textArr) let output1 = transformToUpperCase(textA, numberOfCharacters) let output2 = transformToUpperCase(textArr, numberOfCharacters)
-
import { transformToSign } from 'password-generator-lite'; let numberOfCharacters = 8 //defult let textA = "text1" let textB = "text2" let textArr = [textA, textB] let output1 = transformToSign(textA) let output2 = transformToSign(textArr) let output1 = transformToSign(textA, numberOfCharacters) let output2 = transformToSign(textArr, numberOfCharacters)
Concatenates an array of strings and computes the SHA256 hash of the resulting string.
Extracts numeric characters from a hash and returns a specified number of characters.
Extracts alphabetical characters from a hash and returns a specified number of characters.
Combines numeric and alphabetical passwords extracted from a hash.
Transforms lowercase letters to uppercase randomly in a string.
Transforms the first alphanumeric character in a string to a random sign.
This project is licensed under the ISC
Contributions are welcome! Please see our Contributing Guidelines for more information.
If you discover any issues, please create an issue in our GitHub repository.
password-generator-lite is developed and maintained by Vir Garg.
For any inquiries or support requests, please contact us at vir.garg.in@gmail.com.