示例#1
0
 /**
  * Selects the appropriate hashing class.
  */
 public function __construct()
 {
     if (extension_loaded('openssl')) {
         $this->hash = new OpenSsl();
     } elseif (class_exists('Crypt_RSA')) {
         $this->hash = new PhpSeclib();
     } else {
         throw SignatureException::create('The "openssl" extension and "phpseclib" libraries are not available.');
     }
 }