mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 20:23:32 +08:00
improve (loading): get rid of the crypto library in the frontend to improve loading speed
This commit is contained in:
10
client/helpers/bcrypt.js
Normal file
10
client/helpers/bcrypt.js
Normal 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);
|
||||
})
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user