bcryptSalt function

String bcryptSalt({
  1. int? nb,
  2. BcryptVersion version = BcryptVersion.$2b,
  3. BcryptSecurity security = BcryptSecurity.good,
})

Generate the encoded salt to be used by the Bcrypt algorithm.

Parameters:

Implementation

String bcryptSalt({
  int? nb,
  BcryptVersion version = BcryptVersion.$2b,
  BcryptSecurity security = BcryptSecurity.good,
}) =>
    BcryptContext(
      version: version,
      cost: nb ?? security.nb,
    ).toEncoded();