diff --git a/src/Util/Crypto.php b/src/Util/Crypto.php index 588be8f932..084ae567ea 100644 --- a/src/Util/Crypto.php +++ b/src/Util/Crypto.php @@ -299,11 +299,11 @@ class Crypto * Creates cryptographic secure random digits * * @param string $digits The count of digits - * @return int The random Digits + * @return string The random Digits * * @throws \Exception In case 'random_int' isn't usable */ - public static function randomDigits($digits) + public static function randomDigits($digits): string { $rn = ''; @@ -312,6 +312,6 @@ class Crypto $rn .= random_int(0, 9); } - return (int) $rn; + return $rn; } }