Scrypt key derivation function
| see | \Zend\Crypt\Key\Derivation\http://www.tarsnap.com/scrypt.html |
|---|---|
| see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01 |
calc(string $password, string $salt, integer $n, integer $r, integer $p, integer $length) : string
string
string
integerCPU cost
integerMemory cost
integerparallelization cost
integersize of the output key
stringhex2bin(string $hex) : string
string
stringintegerify(string $b) : integer
Integerify (B[0] ... B[2 * r - 1]) is defined as the result of interpreting B[2 * r - 1] as a little-endian integer. Each block B is a string of 64 bytes.
| see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-4 |
|---|
string
integersalsa208Core32(string $b) : string
| see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-2 |
|---|---|
| see | \Zend\Crypt\Key\Derivation\http://cr.yp.to/salsa20.html |
string
stringsalsa208Core64(string $b) : string
| see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-2 |
|---|---|
| see | \Zend\Crypt\Key\Derivation\http://cr.yp.to/salsa20.html |
string
stringscryptBlockMix(string $b, integer $r) : string
| see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-3 |
|---|
string
integer
stringscryptROMix(string $b, integer $n, integer $r) : string
| see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-4 |
|---|
string
integer
integer
string