mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-01 02:43:35 +08:00
11 lines
251 B
JavaScript
11 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);
|
|
})
|
|
});
|
|
}
|