includes/math.php
changeset 768 111fd7a4415c
parent 685 17ebe24cdf85
child 801 eb8b23f11744
equal deleted inserted replaced
767:cba10e1031eb 768:111fd7a4415c
    63    * @return resource
    63    * @return resource
    64    */
    64    */
    65   
    65   
    66   function random($len)
    66   function random($len)
    67   {
    67   {
    68     return gmp_random($len);
    68     return gmp_random($len / 8);
    69   }
    69   }
    70   
    70   
    71   /**
    71   /**
    72    * Powmod operation (calculates (a ^ b) mod m)
    72    * Powmod operation (calculates (a ^ b) mod m)
    73    * @param resource a
    73    * @param resource a