Returns fingerprint for any type of input/argument.

@author Benjamin Carl <opensource@clickalicious.de>

@return string Fingerprint for input
775124
public function generateFingerprint()
    {
        // Assume empty fingerprint
        $fingerprint = '';

        // Get arguments
        $arguments = func_get_args();

        foreach ($arguments as $argument) {
            $fingerprint .= serialize($argument);
        }

        return $fingerprint;
    }
643795
public function getKey(): string
    {
        if (null === $this->name) {
            return $this->type;
        }

        return $this->type . '#' . $this->name;
    }
546947
public function valid_fingerprint( $fingerprint = null )
	{
		if ( is_null( $fingerprint ) )
		{
			$fingerprint = \CCIn::get( \ClanCats::$config->get( 'session.default_fingerprint_parameter' ), false );
		}
		
		return $this->fingerprint === $fingerprint;
	}
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;
    }
802193
public function getSignatureBase() {
		$fields = array();

		if ($this->eetStatus !== null) {
			$fields[] = $this->eetStatus;
		}
		if ($this->data) {
			$fields[] = $this->data->getSignatureBase();
		}
		if ($this->verificationMode !== null) {
			$fields[] = $this->verificationMode ? 'true' : 'false';
		}
		if ($this->vatId) {
			$fields[] = $this->vatId;
		}
		if ($this->receiptNumber) {
			$fields[] = $this->receiptNumber;
		}
		if ($this->receiptTime) {
			if (isset($this->rawData['receiptTime']) and $this->rawData['receiptTime']) {
				$fields[] = $this->rawData['receiptTime'];
			} else {
				$fields[] = self::formatTime($this->receiptTime);
			}
		}
		if ($this->evidenceMode !== null) {
			$fields[] = $this->evidenceMode;
		}
		if ($this->uuid !== null) {
			$fields[] = $this->uuid;
		}
		if ($this->sendTime) {
			if (isset($this->rawData['sendTime']) and $this->rawData['sendTime']) {
				$fields[] = $this->rawData['sendTime'];
			} else {
				$fields[] = self::formatTime($this->sendTime);
			}
		}
		if ($this->acceptTime) {
			if (isset($this->rawData['acceptTime']) and $this->rawData['acceptTime']) {
				$fields[] = $this->rawData['acceptTime'];
			} else {
				$fields[] = self::formatTime($this->acceptTime);
			}
		}
		if ($this->bkp) {
			$fields[] = $this->bkp;
		}
		if ($this->pkp) {
			$fields[] = $this->pkp;
		}
		if ($this->fik) {
			$fields[] = $this->fik;
		}
		if ($this->rejectTime) {
			if (isset($this->rawData['rejectTime']) and $this->rawData['rejectTime']) {
				$fields[] = $this->rawData['rejectTime'];
			} else {
				$fields[] = self::formatTime($this->rejectTime);
			}
		}
		if ($this->error) {
			$fields[] = $this->error->getSignatureBase();
		}
		if ($this->warning) {
			foreach ($this->warning as $w) {
				$fields[] = $w->getSignatureBase();
			}
		}

		return implode('|', $fields);
	}
1254101
public function fingerprint()
    {
        if (! $route = $this->route()) {
            throw new RuntimeException('Unable to generate fingerprint. Route unavailable.');
        }

        return \sha1(\implode('|', [
            $this->getMethod(), $this->root(), $this->path(), $this->ip(),
        ]));
    }
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,
	];
}
2887
public static function valid_fingerprint( $fingerprint = null, $name = null )
	{
		return Manager::create( $name )->valid_fingerprint( $fingerprint );
	}
1280846
public byte[] getFingerprintFromInputStream(InputStream inputStream) {
        byte[] fingerprint = null;
        try {
            fingerprint = new byte[inputStream.available()];
            inputStream.read(fingerprint);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return fingerprint;
    }
1355191
public function toBinary()
    {
        $binary = hex2bin(str_pad(dechex(ord($this->signature)), 2, 0, STR_PAD_LEFT));
        $binary .= hex2bin($this->dec2hex($this->userPrivilege));
        $binary .= hex2bin($this->callbackPhoneNumber);
        
        return $binary;
    }
589502
public function check()
    {
        $attributes = $this->getInputAttributes();
        if (array_key_exists('name', $attributes)) {
            $inputName = $attributes['name'];
        } else {
            $inputName = static::DEFAULT_INPUT_NAME;
        }
        $checkCode = $this->request->get($inputName);
        if (!is_string($checkCode)) {
            $checkCode = '';
        }

        return $this->securimage->check($checkCode);
    }
940695
public function generateFingerPrint() {
        if ($this->_fingerPrint != null)
            return $this->fingerPrint;
        $this->fingerPrint = sha1($this->getVersion());
        return $this->fingerPrint;
    }
1008592
public java.lang.String getUfsFingerprint() {
    java.lang.Object ref = ufsFingerprint_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        ufsFingerprint_ = s;
      }
      return s;
    }
  }
1040374
@StaplerDispatchable
    public Object getFingerprint( String md5sum ) throws IOException {
        Fingerprint r = fingerprintMap.get(md5sum);
        if(r==null)     return new NoFingerprintMatch(md5sum);
        else            return r;
    }
80249
public function IdentificationVariable()
    {
        $this->match(Lexer::T_IDENTIFIER);

        $identVariable = $this->lexer->token['value'];

        $this->deferredIdentificationVariables[] = array(
            'expression'   => $identVariable,
            'nestingLevel' => $this->nestingLevel,
            'token'        => $this->lexer->token,
        );

        return $identVariable;
    }
634020
public function getVerifyHandler()
    {
        if (is_callable($this->verifyHandler)) {
            return $this->verifyHandler;
        }

        return function ($password, $hash) {
            return password_verify($password, $hash);
        };
    }
1057021
@Nullable
  public static Fingerprint parse(String input) {
    if (input == null) {
      return null;
    }
    if (Constants.INVALID_UFS_FINGERPRINT.equals(input)) {
      return new Fingerprint(Collections.emptyMap());
    }
    Map<String, String> kv = Splitter.on(TAGDELIMTER).trimResults().omitEmptyStrings()
            .withKeyValueSeparator(KVDELIMTER).split(input);
    Map<Tag, String> tagMap = new HashMap<>();

    for (Map.Entry<String, String> entry : kv.entrySet()) {
      tagMap.put(Tag.valueOf(entry.getKey()), entry.getValue());
    }

    // Verify required tags
    for (Tag tag : REQUIRED_TAGS) {
      if (!tagMap.containsKey(tag)) {
        return null;
      }
    }

    return new Fingerprint(tagMap);
  }