diff --git a/factories/delegating_hash.ts b/factories/delegating_hash.ts index fc71fdc..60c015f 100644 --- a/factories/delegating_hash.ts +++ b/factories/delegating_hash.ts @@ -15,7 +15,7 @@ export default class DelegatingHashDriver implements HashDriverContract { p: number }>() - static createInstance() { + static createInstance(defaultId: 'argon2id' | 'bcrypt' | 'scrypt' = 'argon2id') { const map = new Map() map.set( 'argon2id', @@ -25,7 +25,7 @@ export default class DelegatingHashDriver implements HashDriverContract { ) map.set('bcrypt', new Bcrypt({})) map.set('scrypt', new Scrypt({})) - return new DelegatingHashDriver('bcrypt', map) + return new DelegatingHashDriver(defaultId, map) } constructor(idForMake: string, idToHashDriver: Map) {