1.1.2 • Published 14 days ago

@teamteanpm2024/sint-nemo-ea v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

@teamteanpm2024/sint-nemo-ea

NodeJS library for hash the passwords with salt

Installation

npm i @teamteanpm2024/sint-nemo-ea

Usage

Generate salt and hash from password

const phws = require('@teamteanpm2024/sint-nemo-ea');

let password = '123456'; // password from user input
let result = await phws.generate(password);

console.log(result.salt); // store the salt to database
consle.log(result.hash); // store the hash as password in database

Verify a password

const phws = require('@teamteanpm2024/sint-nemo-ea');

let password = '123456'; // password from user input
let salt = 'read salt from database';
let hash = 'read hash from database';

let result = await phws.verify(password, hash, salt); // returns true or false
if (result) {
    // password is correct
} else {
    // password is incorrect
}

Modes

The default mode is fast. You can change the mode by passing the mode as a last parameter to the generate and verify functions.

ModeDescription
secure10000 iterations
fast1000 iterations
fastest100 iterations

Tests

npm test
debuggerlaunchanimationbusyregexpconsumeES2019toobjectarktypemacosmobilevariablesECMAScript 7code pointscommandguiddatastructurehelpersvalidatorreact poseArray.prototype.flattenwindowsvaluesqueueMicrotaskfastcloneurlsfast-clonepositiveES5Underscoreopensstatuspurefigletispreprocessornested css-0patchargvmonorepoenderarraycryptoescapenamejson-schema-validatorthrottleArray.prototype.includesfull-widthgetoptflagsnodejscomparestringifierURLSearchParamsdataviewlogoperating-systemmomentcorsasynccolourfantasy-landa11ystructuredClonemodulestreams2sharedarraybufferuser-streamsminimalhasOwnspringfseventsoptionimportArray.prototype.findLastIndexECMAScript 2023colorimmutablesafelookdescriptorstesterWeakMapauthReflect.getPrototypeOfwrapIteratorlinewraptranspilerspeedmake dirwhichqueryentriesfetchWebSocketsstablelastes7tostringtagMicrosoftECMAScript 2019defaultjwtoptimistkoreanmimetypesECMAScript 6watchingSymbol.toStringTag6to5jsdomsetPrototypeOfprettyairbnbbatchdeepwaapiTypedArrayfastifythroatimmerwaitbcryptwebcore-jsprotobufmetadataprogresstestingindicatorcompile lesssanitizationponyfilllesscsscss-in-jsruntimebddargparsestatelesspasswordartES2022dotenvassertionframeworktypescriptstarterdirectoryharmonyinstallerlessmkdirpdroppluginjavascriptrangeerrorhandlerspropertyrgbtslibString.prototype.matchAllajvincludescallstylesymlinkpnpm9Array.prototype.containsobjectESnexteventDispatcheryupyamlerror-handlingTypeScripteast-asian-widthfastcopyoptimizercommanderrateexecarraysonceArray.prototype.flatnpmjsdiffpropspinnersObject.ischromiumpushwritejQueryfindupbootstrap cssperformantmrusyntaxerrorvariables in cssparentes8private dataES2016assertsjoifunctionsFunction.prototype.nameformcjkkarmapopmotionInt16Arrayprotoprocessposejasmineframercss nestingquerystringxdgcryptpicomatchinterruptsArraySymbolreusebrowserURLES8tapeopentypeofES6Maplistenerstddtestspawnes2015ReactiveExtensions
1.1.1

15 days ago

1.1.0

16 days ago

1.1.2

14 days ago

1.0.0

17 days ago