Method __builtin.Nettle.Hash()->crypt_php()
- Method
crypt_php
string(7bit)
crypt_php(string(8bit)
password
,string(7bit)
salt
,int(0..)
|void
rounds
)- Description
Password hashing PHP Portable Hash-style.
- Parameter
password
Password to hash.
- Parameter
salt
7 bit string of length 8 or 9. The first character may encode the exponent for the number of rounds if
rounds
is0
.- Parameter
rounds
Number of rounds. Defaults to taking the value from the
salt
if thesalt
has length9
, otherwise defaults to1<<19
.This algorithm used with Crypto.MD5 is the one used for PHP Portable Hashes (aka
"$P$"
and"$H$"
).Used with Crypto.SHA1 it should be compatible with hashes from Escher CMS (aka
"$Q$"
).Used with Crypto.SHA512 it should be compatible with hashes from Drupal (aka
"$S$"
).- See also