aboutsummaryrefslogtreecommitdiffstats
path: root/providers/LegacyHasherProvider.ts
diff options
context:
space:
mode:
Diffstat (limited to 'providers/LegacyHasherProvider.ts')
-rw-r--r--providers/LegacyHasherProvider.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/providers/LegacyHasherProvider.ts b/providers/LegacyHasherProvider.ts
new file mode 100644
index 0000000..05b2d27
--- /dev/null
+++ b/providers/LegacyHasherProvider.ts
@@ -0,0 +1,14 @@
1import { ApplicationContract } from '@ioc:Adonis/Core/Application';
2import { LegacyHashDriver } from './LegacyHashDriver';
3
4export default class LegacyHasherProvider {
5 constructor(protected app: ApplicationContract) {}
6
7 public async boot() {
8 const Hash = this.app.container.use('Adonis/Core/Hash');
9
10 Hash.extend('legacy', () => {
11 return new LegacyHashDriver();
12 });
13 }
14}