]> git.mxchange.org Git - friendica.git/commitdiff
Fix return type of randomDigits
authorArt4 <art4@wlabs.de>
Thu, 6 Feb 2025 08:30:05 +0000 (08:30 +0000)
committerArt4 <art4@wlabs.de>
Thu, 6 Feb 2025 08:30:05 +0000 (08:30 +0000)
src/Util/Crypto.php

index 588be8f93214559a33c2dd6ec8f3791c3d177e70..084ae567eaa172b3bab34870a33d8b43a3c3608c 100644 (file)
@@ -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;
        }
 }