ericelliott / ericelliott/credential

Hash and Verify taking too much time

Open
#89 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
344
Forks
27
PR merge metrics
No merged PRs in 30d

Description

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 !

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.