bcrypt generate salt()

Creates a salt value, which is needed in the function bcrypt hash password(), for example.

Parameters


Parameter

Description

a

The number of hashing rounds to be used when generating the salt value. The higher the value, the more time and difficulty is required for a brute force attack. If the value 0 is specified, the system default value is used. Important note: If the value is generated for the function bcrypt hash password(), 4 to 31 rounds must be used, otherwise an error occurs there.

Examples


Parameter a

Result

0

$2a$10$yzazaE5KTM6o4uK/nt0rce

7

$2a$07$v52PaLDskNhGqZmQMAX9eu