mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-07 17:02:29 +01:00
10 lines
251 B
JavaScript
10 lines
251 B
JavaScript
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);
|
|
})
|
|
});
|
|
}
|