improve (loading): get rid of the crypto library in the frontend to improve loading speed

This commit is contained in:
Mickael Kerjean
2019-04-30 22:48:42 +10:00
parent b29231d42b
commit 33ed3f47c7
7 changed files with 44 additions and 33 deletions

10
client/helpers/bcrypt.js Normal file
View File

@ -0,0 +1,10 @@
import bcrypt from 'bcryptjs';
export function bcrypt_password(password){
return new Promise((done, error) => {
bcrypt.hash(password, 10, (err, hash) => {
if(err) return error(err)
done(hash);
})
});
}