Skip to content

Releases: adonisjs/hash

Update underlying dependencies

13 Oct 05:38
Compare
Choose a tag to compare

Update underlying dependencies

10 Oct 07:22
Compare
Choose a tag to compare

Fix types

04 Oct 14:35
Compare
Choose a tag to compare

Update underlying dependencies

01 Oct 16:32
Compare
Choose a tag to compare

Simplify dependency management

27 Sep 14:34
Compare
Choose a tag to compare
  • chore: publish under the next tag 4918300
  • test: fix breaking tests 21b0f14
  • refactor: simplify dependencies management e07104b

v5.0.0...v6.0.0

Updating underlying dependencies

21 Jul 15:35
Compare
Choose a tag to compare

Updating @poppinss/manager comes with a breaking changes for the apps using the extend API

  • docs(README): update readme file 664d1d4
  • test: write tests for the provider 910d0ed
  • chore: update @poppinss/manager 0a08664
  • chore: format/update meta files d898f7b
  • chore: update dependencies 3b73077

v4.0.0...v5.0.0

Integrate prettier and update dependencies

06 Jul 05:19
Compare
Choose a tag to compare
  • docs(README): add link to audit report 39db8ce
  • chore: add npm audit report d1329be
  • refactor: drop $ prefix from protected properties 7f76e24
  • chore: add prettier 066da75
  • chore: update dependencies 8c62172

v3.1.1...v4.0.0

Updating underlying dependencies

18 Jun 17:05
Compare
Choose a tag to compare

Adding support for faking hash calls

14 May 10:48
Compare
Choose a tag to compare

The Hashing algorithms like bcrypt and argon2 are expensive in nature. For example: It usually takes a couple of hundred milliseconds to hash or verify a password.

The slowness of hashing algorithms can also make your tests slow. With this release, we added the API to fake out Hash calls during tests using the fake driver.

Example

Following is not the real code, but an attempt to explain the situation in which Hash.fake can be useful.

test('create user', async (assert) => {
  Hash.fake()

  const { body } = await supertest.post('users').send({
    email: 'foo@bar.com',
    password: 'secret',
  })

  assert.equal(body.data.password, 'secret')
  
  Hash.restore()
})

API

Hash.fake()

await Hash.make('some-password') // goes through fake driver
await Hash.use('argon').make('some-password') // still uses the fake driver

Commits

  • chore: update dependencies 3fe52cb
  • feat: add support for faking Hash calls 75e2f5b
  • chore: update dependencies e5f248f
  • feat(hasher): add faker hasher for testing (#1) 9fb329c

v3.0.0...v3.1.0

Swapping underlying hashing drivers

09 May 08:18
Compare
Choose a tag to compare

Earlier we were using @phc/argon2 and @phc/bcrypt as underlying drivers for hashing values. However, both the packages are not maintained. Even though, the packages code is relatively simple and works fine, but their dependencies on bcrypt and argon2 packages is outdated

  • refactor: remove @phc/argon2 and @phc/bcrypt dependencies in favor of self published forks e25a33a
  • refactor: deprecate hash.hash in favor of hash.make b5ac156
  • chore: update dependencies 7b2e7bc

v2.0.4...v3.0.0