f$Password_Hash
f$Password_Hash
Encrypt a password into a secure hash value. The method used is PBKDF2. A sufficiently high number of iterations increases the security of the encryption. The default value of iterations is 64000. The number of iterations should be selected so that the encryption takes about 0.5 to 1 second. Second input of the encryption is a salt value, a randomly generated string. In order to check an entered password, the same number of iterations must be specified and the salt value must also be given. This must therefore be stored in the database in addition to the hash value of the password.
Syntax: | Status = f$Password_Hash ( PGName ) | ||
| Argument | Typ | Bedeutung |
| PGName | string | Name of a parameter group of kind tdv: passwordhash. The parameter group contains the following Parameters: Input: Passwort(string) : the Password itself Iterations (integer) : Count of Iterations. If this parameter is empty, 64000 Iterations are used. Output: Hash (string) : the generated Hash Salt (string) : the generated Salt Zeit (integer) : the needed time in msec. |
Result: | Integer | Status of the Function. 0 means all is ok. –1, if the used eposvbcomexe could not be started. | |
Sample: | PWD.Passwort = 'test_pass#wort' Status = f$password_hash('PWD') Result: PWD.Salt='UHuuq0roHUk+W521OWrw5LAxv7I=' PWD.Hash='g6RDISseIndXIlyFIP5WJm5SMfo=' | ||