Check if the given fingerprint or the default fingerprint
parameter matches the curent session fingerprint.

@param string 			$manager
@return string
2887
public static function valid_fingerprint( $fingerprint = null, $name = null )
	{
		return Manager::create( $name )->valid_fingerprint( $fingerprint );
	}
269940
public function verify($signature, $identifier, &$initTime, &$expireTime, &$errorMsg)
    {
        try {
            $errorMsg = '';
            $decodedSig = $this->base64Decode($signature);
            $uncompressedSig = gzuncompress($decodedSig);
            if ($uncompressedSig === false) {
                throw new SignatureException('gzuncompress error');
            }
            $json = json_decode($uncompressedSig, true);
            if ($json == false) {
                throw new SignatureException('json_decode error');
            }
            $json = (array)$json;
            if ($json['TLS.identifier'] !== $identifier) {
                throw new SignatureException("identifier error sigid:{$json['TLS.identifier']} id:{$identifier}");
            }
            if ($json['TLS.sdk_appid'] != $this->appId) {
                throw new SignatureException("appid error sigappid:{$json['TLS.appid']} thisappid:{$this->appId}");
            }
            $content = $this->genSignatureContent($json);
            $signature = base64_decode($json['TLS.sig']);
            if ($signature == false) {
                throw new SignatureException('sig json_decode error');
            }
            $succ = $this->verifySignature($content, $signature);
            if (!$succ) {
                throw new SignatureException('verify failed');
            }
            $initTime = $json['TLS.time'];
            $expireTime = $json['TLS.expire_after'];
            return true;
        } catch (SignatureException $ex) {
            $errorMsg = $ex->getMessage();
            return false;
        }
    }
1170668
public function getFingerprint($amount)
    {
        if (!filter_var($amount, FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND)) {
            throw new AuthnetInvalidAmountException('You must enter a valid amount greater than zero.');
        }

        return strtoupper(hash_hmac('sha512', sprintf('%s^%s^%s^%s^',
            $this->login,
            $this->sequence,
            $this->timestamp,
            $amount
        ), hex2bin($this->signature)));
    }
338852
public function getIdentifierValue($model, $manager = null)
    {
        $field = (null !== $manager)? $this->getIdentifierReference($manager)->referenceField : $this->identifierField;

        return $model->{'get' . ucfirst($field)}();
    }
1083215
public static Fingerprint fingerprint(byte[] bytes) {
        Fingerprint fingerprint = new Fingerprint();
        for (Algorithms algorithm : VictimsConfig.algorithms()) {
            try {
                MessageDigest md = MessageDigest.getInstance(algorithm
                        .toString().toUpperCase());
                fingerprint.put(algorithm,
                        new String(Hex.encodeHex(md.digest(bytes))));
            } catch (NoSuchAlgorithmException e) {
                // Do nothing just skip
            }
        }
        return fingerprint;
    }
979697
public function getIdentifierReference($manager)
    {
        if (!isset($this->identifierReferences[$manager])) {
            $rule = new \stdClass();
            $rule->referenceField = $this->identifierField;
            $rule->field          = $this->identifierField;

            return $rule;
        }

        return $this->identifierReferences[$manager];
    }
1361110
function (input) {
    if (typeof input === 'string') {
      return farmhash.Fingerprint32String(input);
    }
    if (Buffer.isBuffer(input)) {
      return farmhash.Fingerprint32Buffer(input);
    }
    throw new Error('Expected a String or Buffer for input');
  }
1242112
public boolean matchMetadata(Fingerprint fp) {
    for (Tag tag : METADATA_TAGS) {
      if (!getTag(tag).equals(fp.getTag(tag))) {
        return false;
      }
    }
    return true;
  }
201979
private boolean matchesFingerprint(byte[] buffer, Pattern fingerprint)
   {
      return fingerprint.matcher(m_charset == null ? new String(buffer) : new String(buffer, m_charset)).matches();
   }
941355
public function handle(BlueprintManager $manager) {
        $blueprints = $manager->all();

        if(empty($blueprints)) {
            $this->error("Your application doesn't have any blueprints.");

            return;
        }

        $generalTable = new Table($this->output);
        $generalTable->setHeaders($this->headers);
        $generalTable->setRows($this->getTable($blueprints));
        $generalTable->render();
    }
701635
private static function calculateX509Fingerprint($pem, $algorithm, $binary = false)
    {
        $pem = preg_replace('#-.*-|\r|\n#', '', $pem);
        $bin = base64_decode($pem);

        return hash($algorithm, $bin, $binary);
    }
10427
public function verify(Message $message, string $fingerprint): bool
    {
        $gnupg = new \Crypt_GPG($this->options);
        $gnupg->addSignKey($fingerprint);

        /**
         * @var \Crypt_GPG_Signature[] $verified
         */
        try {
            $verified = $gnupg->verify($message->getBodyText());
            /**
             * @var \Crypt_GPG_Signature $sig
             */
            foreach ($verified as $sig) {
                if ($sig->isValid()) {
                    return true;
                }
            }
            return false;
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'An error occurred trying to verify this message: ' .
                    $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
    }
792259
public function getIdentifier()
    {
        // Get identifier
        $identifier = $this->identifier;

        // If identifier must be obfuscated
        if (true === $this->useObfuscation()) {

            // Who is requesting (fingerprint client)
            $headers = getallheaders();

            // Get arguments
            $filter = ['USER-AGENT', 'ACCEPT', 'ACCEPT-LANGUAGE', 'ACCEPT-ENCODING'];

            foreach ($headers as $header => $value) {
                if (false === in_array(strtoupper($header), $filter)) {
                    unset($headers[$header]);
                }
            }

            $identifier = sha1(
                $identifier.
                $this->generateFingerprint(
                    $this->getClientIp(),
                    $headers
                )
            );
        }

        return $identifier;
    }
1167090
public function getManager($connection = null)
    {
        $connection = $connection ? strtolower($connection) : 'default';

        if (!isset($this->managers[$connection])) {
            $this->managers[$connection] = $this->create($connection);
        }

        return $this->managers[$connection];
    }
1158532
public function getFingerprint($alg = 'sha256')
    {
        if (!in_array($alg, hash_algos())) {
            throw new RuntimeException(
                sprintf(
                    'unsupported algorithm "%s"',
                    $alg
                )
            );
        }

        return hash($alg, $this->toDer(), true);
    }
750242
public static function get_fingerprint() {
	return [
		'ip_address'      => !empty($_SERVER['REMOTE_ADDR']) ?          $_SERVER['REMOTE_ADDR']          : false,
		'user_agent'      => !empty($_SERVER['HTTP_USER_AGENT']) ?      $_SERVER['HTTP_USER_AGENT']      : false,
		'accept_content'  => !empty($_SERVER['HTTP_ACCEPT']) ?          $_SERVER['HTTP_ACCEPT']          : false,
		'accept_charset'  => !empty($_SERVER['HTTP_ACCEPT_CHARSET']) ?  $_SERVER['HTTP_ACCEPT_CHARSET']  : false,
		'accept_encoding' => !empty($_SERVER['HTTP_ACCEPT_ENCODING']) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : false,
		'accept_language' => !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : false,
	];
}
169681
private function getDeviceFingerprint()
    {
        $server = $this->httpRequest()->server();

        $did = '';
        //$did .= $server->httpAccept();
        //$did .= '|' . $server->httpAcceptCharset();
        //$did .= '|' . $server->httpAcceptEncoding();
        $did .= '|' . $server->httpAcceptLanguage();

        // append browser details
        if (empty($server->httpUserAgent())) {
            throw new LoginException('Unable to process the request without a user agent', 100);
        }

        $platform = 'unknown';
        $ub = 'unknown';

        // get the platform
        $ua = $server->httpUserAgent();
        if (preg_match('/linux/i', $ua)) {
            $platform = 'linux';
        } elseif (preg_match('/macintosh|mac os x/i', $ua)) {
            $platform = 'mac';
        } elseif (preg_match('/windows|win32/i', $ua)) {
            $platform = 'windows';
        }

        // get browser name
        if (preg_match('/MSIE/i', $ua) && !preg_match('/Opera/i', $ua)) {
            $ub = "MSIE";
        } elseif (preg_match('/Firefox/i', $ua)) {
            $ub = "Firefox";
        } elseif (preg_match('/Chrome/i', $ua)) {
            $ub = "Chrome";
        } elseif (preg_match('/Safari/i', $ua)) {
            $ub = "Safari";
        } elseif (preg_match('/Opera/i', $ua)) {
            $ub = "Opera";
        } elseif (preg_match('/Netscape/i', $ua)) {
            $ub = "Netscape";
        }

        $did .= '|' . $platform;
        $did .= '|' . $ub;

        return md5($did);
    }