SHA256 PassHash
From SA-MP Wiki
SHA256_PassHash
Description:
Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells.
(password[], salt[], ret_hash[], ret_hash_len)
password[] | The password to hash. |
salt[] | The salt to use in the hash. |
ret_hash[] | The returned hash. |
ret_hash_len | The returned hash maximum length. |
Return Values:
This function does not return any specific values.
Tips |
|
Example Usage:
public OnGameModeInit() { new MyHash[64 + 1]; // + 1 to account for the required null terminator SHA256_PassHash("test", "78sdjs86d2h", MyHash, sizeof MyHash); printf("Returned hash: %s", MyHash); return 1; }