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