Skip to content

Hash and Verify taking too much time  #89

Description

@Geptyro

Hi there ! I hope I'm not putting this message at the wrong place.

I'm working in a team and our project is using your package "credential": "^2.0.0"
I was investigating our login feature taking too much time and it appears that it is coming from the verify function (from 3s to 5s)
I've written this little test to confirm that:

const credential = require('credential')()

const start = async () => {
  let start = new Date()
  const pwd = 'myLittlePassword!#56'
  const hash = await credential.hash(pwd)
  console.log(hash, new Date() - start)
  start = new Date()
  const isValid = await credential.verify(hash, pwd)
  console.log(isValid, new Date() - start)
}

start()

And both the hash and verify functions take around 5 seconds each.
Is it normal to take that long ?
Thanks !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions