diff options
Diffstat (limited to 'src/helpers/password-helpers.ts')
-rw-r--r-- | src/helpers/password-helpers.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/password-helpers.ts b/src/helpers/password-helpers.ts index 053321bbf..d5f2d0c49 100644 --- a/src/helpers/password-helpers.ts +++ b/src/helpers/password-helpers.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { createHash, BinaryLike } from 'crypto'; | 1 | import { createHash, BinaryLike } from 'crypto'; |
2 | 2 | ||
3 | export function hash(password: BinaryLike) { | 3 | export function hash(password: BinaryLike): string { |
4 | return createHash('sha256').update(password).digest('base64'); | 4 | return createHash('sha256').update(password).digest('base64'); |
5 | } | 5 | } |
6 | 6 | ||
7 | export function scorePassword(password: string) { | 7 | export function scorePassword(password: string): number { |
8 | let score = 0; | 8 | let score = 0; |
9 | if (!password) { | 9 | if (!password) { |
10 | return score; | 10 | return score; |