security.BCrypt.GenerateSalt
Generates the encoded value needed as input to the
HashPassword
method.
Syntax
security.BCrypt.GenerateSalt(
cost INTEGER )
RETURNS STRING
- cost defines the number of rounds of hashing to apply. The
default value is 10. This value must be between 4 and 30. It represents 2^cost iteration. An
iteration above 14 may take several minutes to compute.Warning: Using a high cost value for the salt is very CPU consuming, and can really slow down the application depending on the system it is running. Be forewarned that this is expected!
Usage
This method generates the encoded value needed as input to the HashPassword
method.
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).
For an example using BCrypt
methods, see Example: Using security.BCrypt methods.