Skip to content

Commit

Permalink
changed default hash
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsadiqueinam committed Feb 12, 2024
1 parent ba9e549 commit 2c2729b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions factories/delegating_hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, HashDriverContract>()
map.set(
'argon2id',
Expand All @@ -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<string, HashDriverContract>) {
Expand Down

0 comments on commit 2c2729b

Please sign in to comment.