/**
  * Constructor
  *
  * @param string ...$certs Base64 encoded DER certificates
  */
 public function __construct(...$certs)
 {
     foreach ($certs as $cert) {
         if (!Base64::isValid($cert)) {
             throw new \UnexpectedValueException("Certificate must be base64 encoded.");
         }
     }
     parent::__construct(self::PARAM_X509_CERTIFICATE_CHAIN, $certs);
 }
Beispiel #2
0
 /**
  * Constructor
  *
  * @param string $p First prime factor in base64urlUInt encoding
  */
 public function __construct($p)
 {
     $this->_validateEncoding($p);
     parent::__construct(self::PARAM_FIRST_PRIME_FACTOR, $p);
 }
Beispiel #3
0
 /**
  * Constructor
  *
  * @param string $n Modulus in base64urlUInt encoding
  */
 public function __construct($n)
 {
     $this->_validateEncoding($n);
     parent::__construct(self::PARAM_MODULUS, $n);
 }
Beispiel #4
0
 /**
  * Constructor
  *
  * @param string ...$ops Key operations
  */
 public function __construct(...$ops)
 {
     parent::__construct(self::PARAM_KEY_OPERATIONS, $ops);
 }
 /**
  * Constructor
  *
  * @param string $thumbprint Base64url encoded SHA-256 hash
  */
 public function __construct($thumbprint)
 {
     $this->_validateEncoding($thumbprint);
     parent::__construct(self::PARAM_X509_CERTIFICATE_SHA256_THUMBPRINT, (string) $thumbprint);
 }
Beispiel #6
0
 /**
  * Constructor
  *
  * @param string $id Key ID
  */
 public function __construct($id)
 {
     parent::__construct(self::PARAM_KEY_ID, $id);
 }
Beispiel #7
0
 /**
  * Constructor
  *
  * @param string $uri
  */
 public function __construct($uri)
 {
     parent::__construct(self::PARAM_X509_URL, (string) $uri);
 }
Beispiel #8
0
 /**
  * Constructor
  *
  * @param array[] ...$primes
  */
 public function __construct(...$primes)
 {
     parent::__construct(self::PARAM_OTHER_PRIMES_INFO, $primes);
 }
Beispiel #9
0
 /**
  * Constructor
  *
  * @param string $key Private key in base64url encoding
  */
 public function __construct($key)
 {
     $this->_validateEncoding($key);
     parent::__construct(self::PARAM_ECC_PRIVATE_KEY, $key);
 }
Beispiel #10
0
 /**
  * Constructor
  *
  * @param string $use Intended use of the public key
  */
 public function __construct($use)
 {
     parent::__construct(self::PARAM_PUBLIC_KEY_USE, $use);
 }
Beispiel #11
0
 /**
  * Constructor
  *
  * @param string $d Private exponent in base64urlUInt encoding
  */
 public function __construct($d)
 {
     $this->_validateEncoding($d);
     parent::__construct(self::PARAM_PRIVATE_EXPONENT, $d);
 }
Beispiel #12
0
 /**
  * Constructor
  *
  * @param string $algo Algorithm name
  */
 public function __construct($algo)
 {
     parent::__construct(self::PARAM_ALGORITHM, $algo);
 }
Beispiel #13
0
 /**
  * Constructor
  *
  * @param string $type Key type
  */
 public function __construct($type)
 {
     parent::__construct(self::PARAM_KEY_TYPE, $type);
 }
Beispiel #14
0
 /**
  * Constructor
  *
  * @param string $key Base64url encoded key
  */
 public function __construct($key)
 {
     $this->_validateEncoding($key);
     parent::__construct(self::PARAM_KEY_VALUE, $key);
 }
Beispiel #15
0
 /**
  * Constructor
  *
  * @param string $q Second prime factor in base64urlUInt encoding
  */
 public function __construct($q)
 {
     $this->_validateEncoding($q);
     parent::__construct(self::PARAM_SECOND_PRIME_FACTOR, $q);
 }
 /**
  * Constructor
  *
  * @param string $dq Second factor CRT exponent in base64urlUInt encoding
  */
 public function __construct($dq)
 {
     $this->_validateEncoding($dq);
     parent::__construct(self::PARAM_SECOND_FACTOR_CRT_EXPONENT, $dq);
 }
Beispiel #17
0
 /**
  * Constructor
  *
  * @param string $curve Curve name
  */
 public function __construct($curve)
 {
     parent::__construct(self::PARAM_CURVE, $curve);
 }
 /**
  * Constructor
  *
  * @param string $qi First CRT coefficient in base64urlUInt encoding
  */
 public function __construct($qi)
 {
     $this->_validateEncoding($qi);
     parent::__construct(self::PARAM_FIRST_CRT_COEFFICIENT, $qi);
 }