I was setting up bcrypt in my adonis v6 app and the example and explanation in the doc:
https://github.com/adonisjs/v6-docs/blob/main/content/docs/security/hashing.md#bcrypt
will have typescript complain. In the BcryptConfig it is defined as version?: 0x61 | 0x62; which translates to 97 and 98 instead of '2a' and '2b' as described in the docs.
export default defineConfig({
// Make sure to update the default driver to bcrypt
default: 'bcrypt',
list: {
bcrypt: drivers.bcrypt({
rounds: 10,
saltSize: 16,
version: '2b'
})
}
})
version
The version for the hashing algorithm. The supported values are 2a and 2b. Using the latest version, i.e., 2b is recommended.
Hello,
I was setting up bcrypt in my adonis v6 app and the example and explanation in the doc:
https://github.com/adonisjs/v6-docs/blob/main/content/docs/security/hashing.md#bcrypt
will have typescript complain. In the
BcryptConfigit is defined asversion?: 0x61 | 0x62;which translates to 97 and 98 instead of '2a' and '2b' as described in the docs.From the docs: