* Registering the hash class to resolve an instance with the * default hasher. * * Creates a singleton binding for the Hash class that resolves * the default hasher from the hash manager. * * @example * const hash = await container.make(Hash) * const hashed = await hash.make(
()
| 46 | * const hashed = await hash.make('password') |
| 47 | */ |
| 48 | protected registerHash() { |
| 49 | this.app.container.singleton(Hash, async (resolver) => { |
| 50 | const hashManager = await resolver.make('hash') |
| 51 | return hashManager.use() |
| 52 | }) |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Registers the hash manager with the container |