diff options
author | 2019-01-04 20:13:47 +0100 | |
---|---|---|
committer | 2019-01-04 20:13:47 +0100 | |
commit | 5940912751f90e9164b8ecf65b57b3bafba850e3 (patch) | |
tree | e85a98ca0695ff9de8f8de1b0a2e9a0967709620 /src/helpers | |
parent | Fix issue with error view and "user aborted" requests (diff) | |
download | ferdium-app-5940912751f90e9164b8ecf65b57b3bafba850e3.tar.gz ferdium-app-5940912751f90e9164b8ecf65b57b3bafba850e3.tar.zst ferdium-app-5940912751f90e9164b8ecf65b57b3bafba850e3.zip |
Replace jshashes with node crypto module
Diffstat (limited to 'src/helpers')
-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) { |