Пример #1
0
 /**
  * Perform Octet-String-to-Integer Conversion.
  *
  * Defined in SEC 1 section 2.3.8.
  *
  * @param OctetString $os
  * @return Integer
  */
 public static function octetStringToInteger(OctetString $os)
 {
     $num = gmp_import($os->string(), 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN);
     return new Integer(gmp_strval($num, 10));
 }