Lines Matching refs:key
72 * @param string $key
76 public static function load($key, $password = '') argument
78 if (!Strings::is_stringable($key)) {
79 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
82 if (strpos($key, 'PUBLIC') !== false) {
84 } elseif (strpos($key, 'PRIVATE') !== false) {
90 $key = parent::load($key, $password);
92 if (isset($key['privateKey'])) {
104 $result = $components + PKCS1::load($key[$type . 'Key']);
106 if (isset($key['meta'])) {
107 $result['meta'] = $key['meta'];
129 $key = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
130 $key = ASN1::extractBER($key);
131 return self::wrapPrivateKey($key, [], null, $password, null, '', $options);
145 $key = PKCS1::savePublicKey($n, $e);
146 $key = ASN1::extractBER($key);
147 return self::wrapPublicKey($key, null);