Reputation: 1
How to decrypt any encrypted password in nodeJS using mongoose?
`bcrypt.genSalt(5, (err, Salt) => {
bcrypt.hash(this.password, Salt, (err, hash) => {
if(err) {
console.log('Error in generating salt: ' + err)
}
else {
this.password = hash
this.saltString = Salt
next()
}
})
})`
Upvotes: 0
Views: 874
Reputation: 16457
This password is hashed with a salt.
Hashes are made not to be decryptable.
There may even be multiple cleartexts(passwords) that give you the same hash(collisions).
Brute-force (try every possible password) won't help too because it takes very long(million years if you have a good password).
You may try to do a dictionary attack (try words from a dictionary with a few changes) but this won't work if the password is random or e.g. contains multiple/rare words).
In order to avoid that the same password for a username(or anything like that), salts are added that make decryption even more difficult.
Bcrypt can not be cracked until now.
Upvotes: 0
Reputation: 741
No, its not possible.
Upvotes: 1