Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 51) sorted by relevance

123

/dokuwiki/_test/tests/inc/
H A Dauth_password.test.php49 function test_cryptPassword($method, $hash) { argument
51 $hash,
61 function test_verifyPassword($method, $hash) { argument
62 $this->assertTrue(auth_verifyPassword('foo' . $method, $hash));
63 $this->assertFalse(auth_verifyPassword('bar' . $method, $hash));
71 function test_verifySelf($method, $hash) { argument
72 $hash = auth_cryptPassword('foo' . $method, $method);
73 $this->assertTrue(auth_verifyPassword('foo' . $method, $hash));
81 function test_verifyUnusable($method, $hash) { argument
82 $hash = auth_cryptPassword(null, $method);
[all …]
/dokuwiki/inc/
H A DPassHash.php29 * @param string $hash Hash to compare against
32 public function verify_hash($clear, $hash) argument
39 if (str_starts_with($hash, 'U$')) {
42 $hash = substr($hash, 1);
45 $len = strlen($hash);
46 if (preg_match('/^\$1\$([^\$]{0,8})\$/', $hash, $m)) {
50 } elseif (preg_match('/^\$apr1\$([^\$]{0,8})\$/', $hash, $m)) {
54 } elseif (preg_match('/^\$S\$(.{52})$/', $hash, $m)) {
58 } elseif (preg_match('/^\$P\$(.{31})$/', $hash, $m)) {
62 } elseif (preg_match('/^\$H\$(.{31})$/', $hash, $m)) {
[all …]
H A DJWT.php183 $hash = hash('sha256', $user);
184 $file = $conf['metadir'] . '/jwt/' . $hash[0] . '/' . $hash . '.token';
/dokuwiki/inc/Remote/Response/
H A DMedia.php23 public $hash; variable in dokuwiki\\Remote\\Response\\Media
39 * @param string $hash MD5 sum over the file's content
48 $hash = '', argument
58 $this->hash = $hash;
69 $this->hash = md5(io_readFile($this->file, false));
H A DPage.php23 public $hash; variable in dokuwiki\\Remote\\Response\\Page
39 * @param string $hash MD5 sum over the page's content
49 $hash = '', argument
57 $this->hash = $hash;
89 $this->hash = md5(trim(io_readFile($this->file)));
H A DPageHit.php17 public $hash; variable in dokuwiki\\Remote\\Response\\PageHit
/dokuwiki/inc/File/
H A DPageResolver.php23 [$id, $hash] = sexplode('#', $id, 2);
24 $hash = cleanID($hash);
26 $hash = '';
41 if ($hash !== '') $id .= "#$hash";
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Traits/
H A DFingerprint.php48 $hash = new Hash('sha256');
49 $base = base64_encode($hash->hash($key));
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/
H A DPuTTY.php242 $hash = new Hash('sha256');
243 $hash->setKey($hashkey);
246 $hash = new Hash('sha1');
247 $hash->setKey(sha1($hashkey, true));
265 if (!hash_equals($hash->hash($source), $hmac)) {
306 $hash = new Hash('sha256');
307 $hash->setKey('');
310 $hash = new Hash('sha1');
311 $hash->setKey(sha1('putty-private-key-file-mac-key', true));
328 $hash = new Hash('sha256');
[all …]
H A DPKCS8.php355 $hash = self::getPBES1Hash($algorithm);
366 $cipher->setPassword($password, $kdf, $hash, $salt, $iterationCount);
430 $hash = str_replace('-', '/', substr($prf['algorithm'], 11));
434 $hash,
579 $hash = str_replace('-', '/', substr($prf, 11));
616 $hash = self::getPBES1Hash($encryptionAlgorithm);
625 $crypto->setPassword($password, $kdf, $hash, $salt, $iterationCount);
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/
H A DHash.php200 * @param string $hash
202 public function __construct($hash = 'sha256') argument
204 $this->setHash($hash);
266 hash($this->algo, $this->key, true);
284 * @param string $hash
286 public function setHash($hash) argument
289 $this->hashParam = $hash = strtolower($hash);
290 switch ($hash) {
299 $this->length = abs(substr($hash, -3)) >> 3;
311 $hash = substr($hash, 0, -3);
[all …]
H A DRSA.php503 $this->hLen = $this->hash->getLengthInBytes();
554 $h = $this->hash->hash($m);
557 switch ($this->hash->getHash()) {
616 $h = $this->hash->hash($m);
619 switch ($this->hash->getHash()) {
676 $t .= $this->mgfHash->hash($mgfSeed . $c);
700 * @param string $hash
702 public function withHash($hash) argument
707 switch (strtolower($hash)) {
717 $new->hash = new Hash($hash);
[all …]
H A DEC.php340 … return self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods()) ?
376 ->withHash($this->hash->getHash())
450 * @param string $hash
452 public function withHash($hash) argument
457 if ($this->curve instanceof Ed25519 && $hash != 'sha512') {
460 if ($this->curve instanceof Ed448 && $hash != 'shake256-912') {
464 return parent::withHash($hash);
H A DDSA.php219 ->withHash($params->hash->getHash())
291 … return self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods()) ?
310 ->withHash($this->hash->getHash())
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/
H A DPublicKey.php204 $hash = $decoded['digestAlgorithm']['algorithm'];
205 $hash = substr($hash, 0, 3) == 'id-' ?
206 substr($hash, 3) :
207 $hash;
208 $hash = new Hash($hash);
209 $em = $hash->hash($m);
233 $mHash = $this->hash->hash($m);
257 $h2 = $this->hash->hash($m2);
382 $lHash = $this->hash->hash($this->label);
482 'hash' => $this->hash->getHash(),
[all …]
H A DPrivateKey.php207 $mHash = $this->hash->hash($m);
214 $h = $this->hash->hash($m2);
377 $lHash = $this->hash->hash($this->label);
462 ->withHash($this->hash->getHash())
487 'hash' => $this->hash->getHash(),
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/
H A DAsymmetricKey.php56 protected $hash; variable in phpseclib3\\Crypt\\Common\\AsymmetricKey
108 $this->hash = new Hash('sha256');
465 * @param string $hash
467 public function withHash($hash) argument
471 $new->hash = new Hash($hash);
472 $new->hmac = new Hash($hash);
483 return clone $this->hash;
503 $k = $this->hmac->hash($v . "\0" . $x . $h1);
505 $v = $this->hmac->hash($v);
506 $k = $this->hmac->hash($v . "\1" . $x . $h1);
[all …]
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/
H A DIdentity.php161 * @param string $hash
163 public function withHash($hash) argument
167 $hash = strtolower($hash);
171 switch ($hash) {
197 if ($hash != $expectedHash) {
202 if ($hash != 'sha1') {
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/
H A DPrivateKey.php118 $hash = new Hash($curve::HASH);
120 $secret = substr($hash->hash($this->secret), $curve::SIZE);
130 $r = $hash->hash($dom . $secret . $message);
136 $k = $hash->hash($dom . $R . $A . $message);
146 … if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) {
153 …nature, $this->withPassword()->toString('PKCS8', ['namedCurve' => false]), $this->hash->getHash());
166 $e = $this->hash->hash($message);
169 $Ln = $this->hash->getLength() - $order->getLength();
249 ->withHash($this->hash->getHash())
H A DPublicKey.php98 $hash = new Hash($curve::HASH);
99 $k = $hash->hash($dom2 . substr($signature, 0, $curve::SIZE) . $A . $message);
120 … if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) {
123 …_verify($message, $sig, $this->toString('PKCS8', ['namedCurve' => false]), $this->hash->getHash());
135 $e = $this->hash->hash($message);
138 $Ln = $this->hash->getLength() - $order->getLength();
/dokuwiki/inc/parser/
H A Drenderer.php580 * @param string $hash hash link identifier
583 public function locallink($hash, $name = null) argument
898 [$name, $hash] = sexplode('#', $name, 2);
899 if ($hash) return $hash;
933 $hash = strrchr($reference, '#');
934 if ($hash) {
935 $reference = substr($reference, 0, -strlen($hash));
936 $hash = substr($hash, 1);
981 if ($hash) $url .= '#' . rawurlencode($hash);
/dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/
H A DPrivateKey.php67 ->withHash($this->hash->getHash())
82 … if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) {
84 … $result = openssl_sign($message, $signature, $this->toString('PKCS8'), $this->hash->getHash());
97 $h = $this->hash->hash($message);
H A DPublicKey.php45 … if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) {
48 … $result = openssl_verify($message, $sig, $this->toString('PKCS8'), $this->hash->getHash());
61 $h = $this->hash->hash($message);
/dokuwiki/inc/Remote/
H A DApiCore.php244 * @param bool $hash Whether to include a MD5 hash of the page content
248 public function listPages($namespace = '', $depth = 1, $hash = false) argument
256 return $this->getAllPages($hash);
269 $opts['hash'] = $hash;
291 protected function getAllPages($hash = false) argument
304 if ($hash) $page->calculateHash();
448 * @param bool $hash whether to include the MD5 hash of the page content
453 public function getPageInfo($page, $rev = 0, $author = false, $hash = false) argument
459 if ($hash) $result->calculateHash();
750 * @param bool $hash Whether to include a MD5 hash of the media content
[all …]
/dokuwiki/_test/tests/test/
H A Dedit_and_save.test.php86 $hash = strpos($found[0], '#');
87 $headerID = substr($found[0], $hash);
169 $hash = strpos($found[0], '#');
170 $headerID = substr($found[0], $hash);

123