security.PBKDF2.CheckKey
Validates a hashed key.
Syntax
security.PBKDF2.CheckKey(
password STRING,
salt STRING,
hash STRING,
iter INTEGER,
hashedkey STRING )
RETURNS BOOLEAN
- password defines the human readable password to derive using the PBKDF2 method.
- salt defines the base64 random value created
using
Security.RandomGenerator.CreateRandomString(). Can beNULL. - hash defines the hash operation. By default, it is
"SHA1". Valid values include:
- SHA1
- SHA224
- SHA256
- SHA384
- SHA512
- MD5
- iter defines the number of iterations to compute the derived password. This value must be greater than or equal to zero (>=0).
- hashedkey defines the key created by the
Security.PBKDF2.GenerateKey()class method.
Usage
This method validates a hashed key produced by the security.PBKDF2.GenerateKey
method.
The method returns TRUE, if the hashed key is valid, and returns
FALSE, if the hashed key is not valid.
This method may raise exception -15700 (operation failed) or -15701 (invalid parameter).
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).