PHP Класс Neos\Flow\Security\Cryptography\Algorithms

Right now this class provides a PHP based PBKDF2 implementation.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
pbkdf2 ( string $password, string $salt, integer $iterationCount, integer $derivedKeyLength, string $algorithm = 'sha256' ) : string Compute a derived key from a password based on PBKDF2

Описание методов

pbkdf2() публичный статический Метод

See PKCS #5 v2.0 http://tools.ietf.org/html/rfc2898 for implementation details. The implementation is tested with test vectors from http://tools.ietf.org/html/rfc6070 . If https://wiki.php.net/rfc/hash_pbkdf2 is ever part of PHP we should check for the existence of hash_pbkdf2() and use it if available.
public static pbkdf2 ( string $password, string $salt, integer $iterationCount, integer $derivedKeyLength, string $algorithm = 'sha256' ) : string
$password string Input string / password
$salt string The salt
$iterationCount integer Hash iteration count
$derivedKeyLength integer Derived key length
$algorithm string Hash algorithm to use, see hash_algos(), defaults to sha256
Результат string The computed derived key as raw binary data