diff options
author | 2024-02-10 18:37:40 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | e1c47572a6235fd8fd20af888ac3a11c7ae1369d (patch) | |
tree | 2dccff36a441916d7014037cef3f7ce84a790cad /providers/LegacyHashDriver.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.gz ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.zst ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.zip |
updates
Diffstat (limited to 'providers/LegacyHashDriver.ts')
-rw-r--r-- | providers/LegacyHashDriver.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/providers/LegacyHashDriver.ts b/providers/LegacyHashDriver.ts index eb2a263..d01e3bb 100644 --- a/providers/LegacyHashDriver.ts +++ b/providers/LegacyHashDriver.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import bcrypt from 'bcrypt' | 1 | import bcrypt from 'bcrypt'; |
2 | import { HashDriverContract } from '@adonisjs/core/hash' | 2 | import { HashDriverContract } from '@adonisjs/core/hash'; |
3 | 3 | ||
4 | /** | 4 | /** |
5 | * Implementation of custom bcrypt driver | 5 | * Implementation of custom bcrypt driver |
@@ -9,12 +9,12 @@ export class LegacyHashDriver implements HashDriverContract { | |||
9 | * Hash value | 9 | * Hash value |
10 | */ | 10 | */ |
11 | public async make(value: string) { | 11 | public async make(value: string) { |
12 | return bcrypt.hash(value, 10) | 12 | return bcrypt.hash(value, 10); |
13 | } | 13 | } |
14 | /** | 14 | /** |
15 | * Verify value | 15 | * Verify value |
16 | */ | 16 | */ |
17 | public async verify(hashedValue: string, plainValue: string) { | 17 | public async verify(hashedValue: string, plainValue: string) { |
18 | return bcrypt.compare(plainValue, hashedValue) | 18 | return bcrypt.compare(plainValue, hashedValue); |
19 | } | 19 | } |
20 | } | 20 | } |