diff options
Diffstat (limited to 'providers/LegacyHashDriver.ts')
-rw-r--r-- | providers/LegacyHashDriver.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/providers/LegacyHashDriver.ts b/providers/LegacyHashDriver.ts index 22f9de1..eb2a263 100644 --- a/providers/LegacyHashDriver.ts +++ b/providers/LegacyHashDriver.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import bcrypt from 'bcrypt'; | 1 | import bcrypt from 'bcrypt' |
2 | import { HashDriverContract } from '@ioc:Adonis/Core/Hash'; | 2 | import { HashDriverContract } from '@adonisjs/core/hash' |
3 | |||
3 | /** | 4 | /** |
4 | * Implementation of custom bcrypt driver | 5 | * Implementation of custom bcrypt driver |
5 | */ | 6 | */ |
@@ -8,12 +9,12 @@ export class LegacyHashDriver implements HashDriverContract { | |||
8 | * Hash value | 9 | * Hash value |
9 | */ | 10 | */ |
10 | public async make(value: string) { | 11 | public async make(value: string) { |
11 | return bcrypt.hash(value, 10); | 12 | return bcrypt.hash(value, 10) |
12 | } | 13 | } |
13 | /** | 14 | /** |
14 | * Verify value | 15 | * Verify value |
15 | */ | 16 | */ |
16 | public async verify(hashedValue: string, plainValue: string) { | 17 | public async verify(hashedValue: string, plainValue: string) { |
17 | return bcrypt.compare(plainValue, hashedValue); | 18 | return bcrypt.compare(plainValue, hashedValue) |
18 | } | 19 | } |
19 | } | 20 | } |