Skip to content

bycrpt versions in the docs don't match with the ones in the code #201

@Realtin

Description

@Realtin

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 BcryptConfig it is defined as version?: 0x61 | 0x62; which translates to 97 and 98 instead of '2a' and '2b' as described in the docs.

From 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions