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, int $n, int $r, int $p, int $length) : string
string
string
int
CPU cost
int
Memory cost
int
parallelization cost
int
size of the output key
string
hex2bin(string $hex) : string
string
string
integerify(string $b) : int
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
int
salsa208Core32(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
string
salsa208Core64(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
string
scryptBlockMix(string $b, int $r) : string
see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-3 |
---|
string
int
string
scryptROMix(string $b, int $n, int $r) : string
see | \Zend\Crypt\Key\Derivation\https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-4 |
---|
string
int
int
string