Reputation: 53
I want to save password in md5 format can anyone tell me how it is possible in mongodb? I have used bcrypt and salt but the format of my password is not md5
Upvotes: 0
Views: 2034
Reputation: 1692
In NodeJS you can use Crypto library doing this
var crypto = require('crypto');
var password = 'my Password';
var hash = crypto.createHash('md5').update(password).digest('hex');
You can have more informations about this method here crypto.createHash
Upvotes: 1