Verify input

@param string $plainText
@param string $hashedText
@return bool result
350540
public static function verify($plainText, $hashedText)
    {
        self::init();

        return self::$generator->verify($plainText, $hashedText);
    }
939258
public function theResponseShouldNotContain($text)
    {
        $expectedRegexp = '/' . preg_quote($text) . '/';
        $actual = (string) $this->response->getBody();
        Assertions::assertNotRegExp($expectedRegexp, $actual);
    }
748289
public function validateHash(string $hash, string $algorithm = 'sha256', bool $raw = false): bool
	{
		return hash_equals($hash, $this->getHash($algorithm, $raw));
	}
973135
private function validate($hash, string $validation_regex): void {
    if(!is_string($hash) || preg_match($validation_regex, $hash) === 0) {
      throw new InvalidArgumentException('Expected hash, but got ' . var_export($hash, true) . '] instead');
    }
  }
955922
public function encrypt(string $plainText, ContentEncryptionKey $contentEncryptionKey, Nonce $nonce, Salt $salt, PublicKey $senderPublicKey) : Cipher
    {
        $encryptedText = openssl_encrypt($plainText, 'aes-128-gcm', $contentEncryptionKey->getRawKeyMaterial(), OPENSSL_RAW_DATA, $nonce->getRawBytes(), $tag);

        $cipherText = new CipherText(new BinaryString($encryptedText));
        $tag = new AuthenticationTag(new BinaryString($tag));

        return new Cipher($cipherText, $tag, $salt, $senderPublicKey);
    }
470016
public function verify($input, $existingHash) {
		$hash = crypt($input, $existingHash);
		return Utils::compareStr($existingHash, $hash);
	}
972245
def check_password(self, hashed_password, plain_password):
        
        salt, encrypted_password = hashed_password.split('$')
        re_encrypted_password = self.get_hash(salt, plain_password)
        return encrypted_password == re_encrypted_password
13560
function encrypt($plaintext)
    {
        // parent::en/decrypt() is able to do all the work for all modes and keylengths,
        // except for: self::MODE_3CBC (inner chaining CBC) with a key > 64bits

        // if the key is smaller then 8, do what we'd normally do
        if ($this->mode_3cbc && strlen($this->key) > 8) {
            return $this->des[2]->encrypt(
                $this->des[1]->decrypt(
                    $this->des[0]->encrypt(
                        $this->_pad($plaintext)
                    )
                )
            );
        }

        return parent::encrypt($plaintext);
    }
241142
public static function encrypt(
        string $plaintext,
        SharedEncryptionKey $key
    ): string {
        $nonce = random_bytes(\ParagonIE_Sodium_Compat::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES);
        return $nonce .
            \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt(
                $plaintext,
                $nonce,
                $nonce,
                $key->getString(true)
            );
    }
996324
public static function verify_hash( $string, $hash ) 
	{
		if (is_numeric( $algo = ClanCats::$config->get( 'security.hash', 'md5') ))
		{
			return password_verify( $string, $hash );
		}
		return ($hash === call_user_func( $algo, $string ));
	}
468162
@LogExecTime
	public void verifyTextPresent(String text, String msg)
	{
		jtCore.verifyTextPresent(text, msg);
	}
1036187
public function sendMessage($to, $plaintext, $force_plain = false)
    {
        if (extension_loaded('curve25519') && extension_loaded('protobuf') && !$force_plain) {
            $to_num = ExtractNumber($to);
            if (!(strpos($to, '-') !== false)) {
                if (!$this->axolotlStore->containsSession($to_num, 1)) {
                    $this->sendGetCipherKeysFromUser($to_num);
                }

                $sessionCipher = $this->getSessionCipher($to_num);

                if (in_array($to_num, $this->v2Jids) && !isset($this->v1Only[$to_num])) {
                    $version = '2';
                    $alteredText = padMessage($plaintext);
                } else {
                    $version = '1';
                    $alteredText = $plaintext;
                }
                $cipherText = $sessionCipher->encrypt($alteredText);

                if ($cipherText instanceof WhisperMessage) {
                    $type = 'msg';
                } else {
                    $type = 'pkmsg';
                }
                $message = $cipherText->serialize();
                $msgNode = new ProtocolNode('enc',
              [
                'v'     => $version,
                'type'  => $type,
              ], null, $message);
            } else {
                /* if (in_array($to, $this->v2Jids))
          {
            $version = "2";
            $plaintext = padMessage($plaintext);
          }
          else
            $version = "1";

          if(!$this->axolotlStore->containsSenderKey($to)){
            $gsb = new GroupSessionBuilder($this->axolotlStore);
            $senderKey = $gsb->process ($groupId, $keyId, $iteration, $chainKey, $signatureKey)
          }
          $thi*/
          $msgNode = new ProtocolNode('body', null, null, $plaintext);
            }
        } else {
            $msgNode = new ProtocolNode('body', null, null, $plaintext);
        }
        $plaintextNode = new ProtocolNode('body', null, null, $plaintext);
        $id = $this->sendMessageNode($to, $msgNode, null, $plaintextNode);

        if ($this->messageStore !== null) {
            $this->messageStore->saveMessage($this->phoneNumber, $to, $plaintext, $id, time());
        }

        return $id;
    }
850900
function hash_verify (password, _hash) {
  let hash = _hash.split('|')
  switch (hash[1]) {
    case 'bcrypt':
      return bcrypt_compare(password, hash[0])
    default:
      return Promise.resolve(password === hash[0])
  }
}
1329535
public function check(string $password, string $hashedPassword): bool
    {
        return $hashedPassword === $this->hash($password);
    }
650634
public static function comparePasswordToHash( $plainText, $hash ) {
		if ( self::isBlowfishHash( $hash ) ) {
			$check = crypt( $plainText, $hash );

		} else {
			// horrible unsalted md5 that legacy app used for passwords
			$check = md5( $plainText );
		}

		return self::hashEquals( $hash, $check );
	}
168593
public static function verifyHash(string $hash, string $text, string $format = null): bool
    {
        return \hash_equals($hash, self::hash($text, $format));
    }
875843
public static boolean bcryptMatches(String plain, String storedHash) {
		if (StringUtils.isBlank(plain) || StringUtils.isBlank(storedHash)) {
			return false;
		}
		try {
			return BCrypt.checkpw(plain, storedHash);
		} catch (Exception e) {
			return false;
		}
	}