aboutsummaryrefslogtreecommitdiffstats
path: root/providers/LegacyHashDriver.ts
diff options
context:
space:
mode:
Diffstat (limited to 'providers/LegacyHashDriver.ts')
-rw-r--r--providers/LegacyHashDriver.ts20
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 @@
1import bcrypt from 'bcrypt';
2import { HashDriverContract } from '@adonisjs/core/hash';
3
4/**
5 * Implementation of custom bcrypt driver
6 */
7export 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}