diff options
author | 2019-01-05 21:12:42 +0100 | |
---|---|---|
committer | 2019-01-05 21:12:42 +0100 | |
commit | 904eb333103e0d3b9f6c23ca49d76d403f43ded3 (patch) | |
tree | 8f3367d306fb4d9d9f82e6bc5dd502853e63cbca /src/helpers/password-helpers.js | |
parent | Add lerna instructions (diff) | |
download | ferdium-app-904eb333103e0d3b9f6c23ca49d76d403f43ded3.tar.gz ferdium-app-904eb333103e0d3b9f6c23ca49d76d403f43ded3.tar.zst ferdium-app-904eb333103e0d3b9f6c23ca49d76d403f43ded3.zip |
Merge
Diffstat (limited to 'src/helpers/password-helpers.js')
-rw-r--r-- | src/helpers/password-helpers.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/password-helpers.js b/src/helpers/password-helpers.js index 7aacaa4d0..cf461e4f7 100644 --- a/src/helpers/password-helpers.js +++ b/src/helpers/password-helpers.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import { SHA256 } from 'jshashes'; | 1 | import crypto from 'crypto'; |
2 | 2 | ||
3 | export function hash(password) { | 3 | export function hash(password) { |
4 | return new SHA256().b64(password); | 4 | return crypto.createHash('sha256').update(password).digest('base64'); |
5 | } | 5 | } |
6 | 6 | ||
7 | export function scorePassword(password) { | 7 | export function scorePassword(password) { |