diff options
author | 2024-02-11 19:15:20 +0530 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | 8fec21d6bccfa778c14c1714d6444312e36fc3f1 (patch) | |
tree | cab910ad5048eece2d229648f2c17000ac86a44d /providers/LegacyHashDriver.ts | |
parent | updates (diff) | |
download | ferdium-server-03e8c2b08e08822bcd069ad482799eecf1ede777.tar.gz ferdium-server-03e8c2b08e08822bcd069ad482799eecf1ede777.tar.zst ferdium-server-03e8c2b08e08822bcd069ad482799eecf1ede777.zip |
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 | } | ||