Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 172) sorted by relevance

1234567

/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/
H A DPublicKeyLoader.php33 * @param string|array $key
36 public static function load($key, $password = false) argument
39 return EC::load($key, $password);
44 return RSA::load($key, $password);
49 return DSA::load($key, $password);
55 $x509->loadX509($key);
56 $key = $x509->getPublicKey();
57 if ($key) {
58 return $key;
70 * @param string|array $key
[all …]
H A DTwofish.php414 * @param string $key
417 public function setKey($key) argument
419 switch (strlen($key)) {
425 …throw new \LengthException('Key of size ' . strlen($key) . ' not supported by this algorithm. Only…
428 parent::setKey($key);
438 if (isset($this->kl['key']) && $this->key === $this->kl['key']) {
442 $this->kl = ['key' => $this->key];
445 $le_longs = unpack('V*', $this->key);
446 $key = unpack('C*', $this->key);
456 switch (strlen($this->key)) {
[all …]
H A DAES.php100 * @param string $key
103 public function setKey($key) argument
105 switch (strlen($key)) {
111 …throw new \LengthException('Key of size ' . strlen($key) . ' not supported by this algorithm. Only…
114 parent::setKey($key);
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/
H A DJWK.php28 * @param string $key
32 public static function load($key, $password = '') argument
34 if (!Strings::is_stringable($key)) {
35 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
38 $key = preg_replace('#\s#', '', $key); // remove whitespace
41 $key = json_decode($key, null, 512, JSON_THROW_ON_ERROR);
43 $key = json_decode($key);
44 if (!$key) {
49 if (isset($key->kty)) {
50 return $key;
[all …]
H A DOpenSSH.php59 * @param string $key
63 public static function load($key, $password = '') argument
65 if (!Strings::is_stringable($key)) {
66 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
72 if (strpos($key, 'BEGIN OPENSSH PRIVATE KEY') !== false) {
73 $key = preg_replace('#(?:^-.*?-[\r\n]*$)|\s#ms', '', $key);
74 $key = Strings::base64_decode($key);
75 $magic = Strings::shift($key, 15);
79 list($ciphername, $kdfname, $kdfoptions, $numKeys) = Strings::unpackSSH2('sssN', $key);
103 list($publicKey, $paddedKey) = Strings::unpackSSH2('ss', $key);
[all …]
H A DPuTTY.php126 * @param string $key
130 public static function load($key, $password) argument
132 if (!Strings::is_stringable($key)) {
133 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
136 if (strpos($key, 'BEGIN SSH2 PUBLIC KEY') !== false) {
137 $lines = preg_split('#[\r\n]+#', $key);
179 $key = preg_split('#\r\n|\r|\n#', trim($key));
180 if (Strings::shift($key[0], strlen('PuTTY-User-Key-File-')) != 'PuTTY-User-Key-File-') {
183 …$version = (int) Strings::shift($key[0], 3); // should be either "2: " or "3: 0" prior to int cast…
187 $components['type'] = $type = rtrim($key[0]);
[all …]
H A DPKCS1.php113 * @param string $key
117 protected static function load($key, $password) argument
119 if (!Strings::is_stringable($key)) {
120 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
138 if (preg_match('#DEK-Info: (.+),(.+)#', $key, $matches)) {
141 $key = preg_replace('#^(?:Proc-Type|DEK-Info): .*#m', '', $key);
142 $ciphertext = ASN1::extractBER($key);
144 $ciphertext = $key;
149 $key = $crypto->decrypt($ciphertext);
152 $decoded = ASN1::extractBER($key);
[all …]
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/
H A DPKCS1.php41 * @param string $key
45 public static function load($key, $password = '') argument
47 if (!Strings::is_stringable($key)) {
48 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
51 if (strpos($key, 'PUBLIC') !== false) {
53 } elseif (strpos($key, 'PRIVATE') !== false) {
59 $key = parent::load($key, $password);
61 $decoded = ASN1::decodeBER($key);
66 $key = ASN1::asn1map($decoded[0], Maps\RSAPrivateKey::MAP);
67 if (is_array($key)) {
[all …]
H A DRaw.php38 * @param string $key
42 public static function load($key, $password = '') argument
44 if (!is_array($key)) {
45 throw new \UnexpectedValueException('Key should be a array - not a ' . gettype($key));
48 $key = array_change_key_case($key, CASE_LOWER);
53 if (isset($key[$index])) {
54 $components['publicExponent'] = $key[$index];
60 if (isset($key[$index])) {
61 $components['modulus'] = $key[$index];
70 if (isset($key['primes'])) {
[all …]
H A DMSBLOB.php70 * @param string $key
74 public static function load($key, $password = '') argument
76 if (!Strings::is_stringable($key)) {
77 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
80 $key = Strings::base64_decode($key);
82 if (!is_string($key)) {
85 if (strlen($key) < 20) {
91 extract(unpack('atype/aversion/vreserved/Valgo', Strings::shift($key, 8)));
124 extract(unpack('Vmagic/Vbitlen/a4pubexp', Strings::shift($key, 12)));
141 if (strlen($key) != 2 * $baseLength && strlen($key) != 9 * $baseLength) {
[all …]
H A DPKCS8.php63 * @param string $key
67 public static function load($key, $password = '') argument
69 $key = parent::load($key, $password);
71 if (isset($key['privateKey'])) {
79 $result = $components + PKCS1::load($key[$type . 'Key']);
81 if (isset($key['meta'])) {
82 $result['meta'] = $key['meta'];
103 $key = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
104 $key = ASN1::extractBER($key);
105 return self::wrapPrivateKey($key, [], null, $password, null, '', $options);
[all …]
H A DPSS.php94 * @param string $key
98 public static function load($key, $password = '') argument
102 if (!Strings::is_stringable($key)) {
103 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
106 $components = ['isPublicKey' => strpos($key, 'PUBLIC') !== false];
108 $key = parent::load($key, $password);
110 $type = isset($key['privateKey']) ? 'private' : 'public';
112 $result = $components + PKCS1::load($key[$type . 'Key']);
114 if (isset($key[$type . 'KeyAlgorithm']['parameters'])) {
115 $decoded = ASN1::decodeBER($key[$type . 'KeyAlgorithm']['parameters']);
[all …]
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/
H A DRaw.php30 * @param array $key
34 public static function load($key, $password = '') argument
36 if (!is_array($key)) {
37 throw new \UnexpectedValueException('Key should be a array - not a ' . gettype($key));
41 case !isset($key['p']) || !isset($key['q']) || !isset($key['g']):
42 case !$key['p'] instanceof BigInteger:
43 case !$key['q'] instanceof BigInteger:
44 case !$key['g'] instanceof BigInteger:
45 case !isset($key['x']) && !isset($key['y']):
46 case isset($key['x']) && !$key['x'] instanceof BigInteger:
[all …]
H A DPKCS1.php46 * @param string $key
50 public static function load($key, $password = '') argument
52 $key = parent::load($key, $password);
54 $decoded = ASN1::decodeBER($key);
59 $key = ASN1::asn1map($decoded[0], Maps\DSAParams::MAP);
60 if (is_array($key)) {
61 return $key;
64 $key = ASN1::asn1map($decoded[0], Maps\DSAPrivateKey::MAP);
65 if (is_array($key)) {
66 return $key;
[all …]
H A DXML.php36 * @param string $key
40 public static function load($key, $password = '') argument
42 if (!Strings::is_stringable($key)) {
43 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
53 if (substr($key, 0, 5) != '<?xml') {
54 $key = '<xml>' . $key . '</xml>';
56 if (!$dom->loadXML($key)) {
62 foreach ($keys as $key) {
64 …("//*[translate(local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='$key']");
69 switch ($key) {
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/
H A DPKCS8.php63 * @param string $key
67 public static function load($key, $password = '') argument
76 $key = parent::load($key, $password);
78 $type = isset($key['privateKey']) ? 'privateKey' : 'publicKey';
80 switch ($key[$type . 'Algorithm']['algorithm']) {
83 return self::loadEdDSA($key);
86 $decoded = ASN1::decodeBER($key[$type . 'Algorithm']['parameters']->element);
99 $components['QA'] = self::extractPoint("\0" . $key['publicKey'], $components['curve']);
104 $decoded = ASN1::decodeBER($key['privateKey']);
108 $key = ASN1::asn1map($decoded[0], Maps\ECPrivateKey::MAP);
[all …]
H A DJWK.php40 * @param string $key
44 public static function load($key, $password = '') argument
46 $key = parent::load($key, $password);
48 switch ($key->kty) {
50 switch ($key->crv) {
57 …xception('Only P-256, P-384, P-521 and secp256k1 curves are accepted (' . $key->crv . ' provided)'…
61 switch ($key->crv) {
66 …nsupportedCurveException('Only Ed25519 and Ed448 curves are accepted (' . $key->crv . ' provided)'…
73 $curve = '\phpseclib3\Crypt\EC\Curves\\' . str_replace('P-', 'nistp', $key->crv);
77 $QA = self::extractPoint(Strings::base64url_decode($key->x), $curve);
[all …]
H A DPKCS1.php50 * @param string $key
54 public static function load($key, $password = '') argument
58 if (!Strings::is_stringable($key)) {
59 throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key));
62 if (strpos($key, 'BEGIN EC PARAMETERS') && strpos($key, 'BEGIN EC PRIVATE KEY')) {
65 preg_match('#-*BEGIN EC PRIVATE KEY-*[^-]*-*END EC PRIVATE KEY-*#s', $key, $matches);
81 preg_match('#-*BEGIN EC PARAMETERS-*[^-]*-*END EC PARAMETERS-*#s', $key, $matches);
112 $key = parent::load($key, $password);
114 $decoded = ASN1::decodeBER($key);
119 $key = ASN1::asn1map($decoded[0], Maps\ECParameters::MAP);
[all …]
/dokuwiki/_test/core/
H A DTestRequest.php32 * @param string $key
35 public function getServer($key) { argument
36 return $this->server[$key];
42 * @param string $key
45 public function getSession($key) { argument
46 return $this->session[$key];
52 * @param string $key
55 public function getGet($key) { argument
56 return $this->get[$key];
62 * @param string $key
[all …]
/dokuwiki/vendor/simplepie/simplepie/src/Cache/
H A DDataCache.php72 * @param string $key The unique key of this item in the cache.
80 public function get_data(string $key, $default = null); argument
90 * @param string $key The key of the item to store.
101 public function set_data(string $key, array $value, ?int $ttl = null): bool; argument
111 * @param string $key The unique cache key of the item to delete.
118 public function delete_data(string $key): bool; argument
H A DPsr16.php84 * @param string $key The unique key of this item in the cache.
92 public function get_data(string $key, $default = null) argument
94 $data = $this->cache->get($key, $default);
111 * @param string $key The key of the item to store.
122 public function set_data(string $key, array $value, ?int $ttl = null): bool argument
124 return $this->cache->set($key, $value, $ttl);
135 * @param string $key The unique cache key of the item to delete.
142 public function delete_data(string $key): bool argument
144 return $this->cache->delete($key);
/dokuwiki/lib/plugins/config/core/
H A DConfiguration.php110 foreach ($this->settings as $key => $obj) {
111 $value = $input[$key] ?? null;
169 foreach ($keys as $key) {
170 $obj = $this->instantiateClass($key);
172 if ($obj->shouldHaveDefault() && !isset($this->default[$key])) {
173 $this->undefined[$key] = new SettingNoDefault($key);
176 $d = $this->default[$key] ?? null;
177 $l = $this->local[$key] ?? null;
178 $p = $this->protected[$key] ?? null;
189 * @param string $key
[all …]
/dokuwiki/lib/scripts/
H A Dcookie.js21 setValue: function(key,val){ argument
26 delete this.data[key];
29 this.data[key] = val;
34 jQuery.each(_this.data, function (key, val) { argument
35 if (_this.data.hasOwnProperty(key)) {
36 text.push(encodeURIComponent(key)+'#'+encodeURIComponent(val));
48 getValue: function(key, def){ argument
50 return this.data.hasOwnProperty(key) ? this.data[key] : def;
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/
H A DAsymmetricKey.php131 * @param string $key
135 public static function load($key, $password = false) argument
150 $components = $format::load($key, $password);
178 * @param string|array $key
181 public static function loadPrivateKey($key, $password = '') argument
183 $key = self::load($key, $password);
184 if (!$key instanceof PrivateKey) {
187 return $key;
194 * @param string|array $key
196 public static function loadPublicKey($key) argument
[all …]
/dokuwiki/inc/Parsing/Handler/
H A DTable.php174 $key = -1;
175 while (++$key < count($this->tableCalls)) {
176 $call = $this->tableCalls[$key];
181 … array_splice($this->tableCalls, $key + 1, 0, [['tablethead_open', [], $call[2]]]);
193 $cellKey[$lastRow][$lastCell] = $key;
197 … $prev = in_array($this->tableCalls[$key - 1][0], ['tablecell_open', 'tableheader_open']);
198 … $next = in_array($this->tableCalls[$key + 1][0], ['tablecell_close', 'tableheader_close']);
201 $this->tableCalls[$key - 1][1][1] = 'left';
205 $this->tableCalls[$key - 1][1][1] = 'right';
217 $this->tableCalls[$key][0] = 'cdata';
[all …]

1234567