diff --git a/composer.json b/composer.json index 8146a64..093a9ee 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,7 @@ ], "minimum-stability": "stable", "require": { - "php": ">=7.3", - "pedrosancao/php-random-data": "^1.0" + "php": ">=7.3" }, "autoload": { "psr-4": { "PedroSancao\\": "src/" } diff --git a/src/OTP/HOTP.php b/src/OTP/HOTP.php index c1f6a6f..8a767a9 100644 --- a/src/OTP/HOTP.php +++ b/src/OTP/HOTP.php @@ -3,7 +3,6 @@ namespace PedroSancao\OTP; use PedroSancao\Base32; -use PedroSancao\Random; class HOTP { @@ -137,7 +136,7 @@ public static function create($secret = null, $size = 6) public static function createRaw($secret = null, $size = 6) { if (is_null($secret)) { - $secret = Random::raw(15); + $secret = random_bytes(16); } return new static($secret, $size); }