cast / scrypt
Scrypt, pure PHP based on https://github.com/MPOS/php-mpos/blob/236cccd5d3178e99504bf2665db8bddfed6aa176/include/lib/scrypt.php
0.1
2020-04-27 16:17 UTC
Requires
- php: ^7.3
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2024-10-22 17:01:38 UTC
README
Pure PHP-implementation without any extensions
Install:
composer require cast/scrypt
Usage:
<?php use function Cast\Crypto\Scrypt\scrypt; $expected = "77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906"; // strlen($expected) == 128 $actual = bin2hex(scrypt("", "", 16, 1, 1, 64)); // strlen($actual) == 128
Based on https://github.com/cmpscabral/cryptobits/tree/master/php/scrypt.