Method Nettle.Hash()->crypt_hash()
- Method
crypt_hash
string(7bit)
crypt_hash(string(8bit)
password
,string(8bit)
salt
,int(0..)
rounds
)- Description
Password hashing function in crypt_md5()-style.
Implements the algorithm described in http://www.akkadia.org/drepper/SHA-crypt.txt.
This is the algorithm used by crypt(2) in methods $5$ (SHA256) and $6$ (SHA512).
The
password
memory will be cleared before released.Rounds will never be set to less than 1000. If
rounds
is 0 it will be set to 5000.- Note
In Pike 8.0.1876 and earlier this function generated incompatible hashes for passwords that had a length that was a power of 2. See crypt_hash_pike() for details.
- See also