You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, i was searching a good way to store passwords/private data in a database using hashing, would this be a secure way?
constcrypto=require('crypto');constrandomSalt=crypto.randomBytes(64).toString('hex');//generate an unique salt for every passwordconstdata="hello world"constsaltedData=data+randomSalt;consthash=crypto.createHash('sha3-512');hash.update(saltedData);consthashedData=hash.digest('hex');//then store hashedData in a database
Minimal Reproduction
Run the code above
Output
No response
Before You Submit
I have looked for issues that already exist before submitting this
Node.js Version
v22.13.0
NPM Version
v11.0.0
Operating System
Windows 10 22H2 (Build 19045.5371)
Subsystem
crypto
Description
Hey, i was searching a good way to store passwords/private data in a database using hashing, would this be a secure way?
Minimal Reproduction
Output
No response
Before You Submit
The text was updated successfully, but these errors were encountered: