Download the PHP package alexandernst/yii2-scrypt without Composer
On this page you can find all versions of the php package alexandernst/yii2-scrypt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download alexandernst/yii2-scrypt
More information about alexandernst/yii2-scrypt
Files in alexandernst/yii2-scrypt
Download alexandernst/yii2-scrypt
More information about alexandernst/yii2-scrypt
Files in alexandernst/yii2-scrypt
Vendor alexandernst
Package yii2-scrypt
Short Description Scrypt key derivation function for Yii2
License GNU General Public License v3
Package yii2-scrypt
Short Description Scrypt key derivation function for Yii2
License GNU General Public License v3
Please rate this library. Is it a good library?
Informations about the package yii2-scrypt
yii2-scrypt
Scrypt key derivation function for Yii2
To use it just require this extension in your composer.json file:
"alexandernst/yii2-scrypt": "0.0.4",
And then add it to your components configuration in Yii2:
'components' => [
'Scrypt' => [
'class' => 'alexandernst\Scrypt\Scrypt'
],
]
To derivate a key, use the following method:
/**
* Scrypt algorithm
*
* @param string $password
* @param string $salt
* @param int $n CPU/Memory cost parameter, must be larger than 1, a power of 2 and less than 2^(128 * r / 8)
* @param int $r Block size
* @param int $p Parallelization parameter, a positive integer less than or equal to ((2^32-1) * hLen) / MFLen where hLen is 32 and MFlen is 128 * r
* @param int $length Length of the output key
* @throws Exception
* @return string
*/
echo bin2hex(\Yii::$app->Scrypt->calc("plain password", "salt", 8, 8, 16, 32));
This class passes all the tests specified in the documentation.
All versions of yii2-scrypt with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
*
The package alexandernst/yii2-scrypt contains the following files
Loading the files please wait ....