"use strict"; /* * @adonisjs/encryption * * (c) Harminder Virk * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ Object.defineProperty(exports, "__esModule", { value: true }); /** * Encryption provider to binding encryption class to the container */ class EncryptionProvider { constructor(app) { this.app = app; } register() { this.app.container.singleton('Adonis/Core/Encryption', () => { const Config = this.app.container.resolveBinding('Adonis/Core/Config'); const { Encryption } = require('../src/Encryption'); return new Encryption({ secret: Config.get('app.appKey') }); }); } } exports.default = EncryptionProvider; EncryptionProvider.needsApplication = true;