Repository navigation
MySQL_HashBcrypt
imshooter edited this page Oct 24, 2026
·
1 revision
Hash a password with bcrypt, as $2b$, on a thread of the component, and call a public with context and the hash.
The public takes (context, const hash[]), as with MySQL_HashArgon2. Only the first 72 bytes of the password count, as bcrypt reads no more.
native bool:MySQL_HashBcrypt(
const password[],
const callback[],
context = 0,
cost = MYSQL_BCRYPT_COST
);| Parameter | Description | Default |
|---|---|---|
const password[] |
The password. | |
const callback[] |
Public to call. | |
context |
Value the public receives. | 0 |
cost |
Cost, from 4 to 20, each step doubling the time. |
MYSQL_BCRYPT_COST |
-
truewhen the work started. -
falsewhen the cost is out of range, orcallbackis not a public of the script.
The hash is $2b$ with its cost and salt, 60 characters long. Each step of the cost doubles the time a hash takes.
-
MySQL_VerifyPassword: Verify a password against an Argon2 or bcrypt hash on a thread of the component, and call a public with
contextand whether they match. -
MySQL_HashArgon2: Hash a password with Argon2id on a thread of the component, and call a public with
contextand the hash.
MySQL 0.2.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- Results
- JSON cells
- Prepared statements
- Passwords
- Errors
- TLS
- Coming from R41
- Performance
Reference
Functions