Exemple #1
0
 /**
  * Initialize static variables
  *
  * @access private
  */
 static function _initialize_static_variables()
 {
     if (!isset(self::$zero)) {
         self::$zero = new BigInteger(0);
         self::$one = new BigInteger(1);
         self::$configFile = __DIR__ . '/../openssl.cnf';
         if (self::$fileFormats === false) {
             self::$fileFormats = array();
             foreach (glob(__DIR__ . '/RSA/*.php') as $file) {
                 $name = pathinfo($file, PATHINFO_FILENAME);
                 $type = 'phpseclib\\Crypt\\RSA\\' . $name;
                 $meta = new \ReflectionClass($type);
                 if (!$meta->isAbstract()) {
                     self::$fileFormats[strtolower($name)] = $type;
                     self::$origFileFormats[] = $name;
                 }
             }
         }
     }
 }
Exemple #2
0
 /**
  * Initialize static variables
  *
  * @access private
  */
 static function _initialize_static_variables()
 {
     if (!isset(self::$zero)) {
         self::$zero = new BigInteger(0);
         self::$one = new BigInteger(1);
         self::$configFile = __DIR__ . '/../openssl.cnf';
     }
 }