Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint calculates the fingerprint of the input. By default, the fingerprint is encoded as a hex string without applying any hash algorithm. The behavior can be adjusted by providing the options.
Types ¶
type Encoding ¶
type Encoding int
Encoding represents the fingerprint encoding type.
const ( // HexFingerprint represents the hex encoding of the fingerprint. HexFingerprint Encoding = iota // Base64StdFingerprint represents the base64 encoding of the fingerprint. Base64StdFingerprint // Base64URLFingerprint represents the base64URL encoding of the fingerprint. Base64URLFingerprint // Base64RawStdFingerprint represents the base64RawStd encoding of the fingerprint. Base64RawStdFingerprint // Base64RawURLFingerprint represents the base64RawURL encoding of the fingerprint. Base64RawURLFingerprint // EmojiFingerprint represents the emoji encoding of the fingerprint. EmojiFingerprint )
type Option ¶
type Option func(*options)
Option customizes the fingerprint generation.
func WithEncoding ¶
WithEncoding sets the encoding that is used to generate the fingerprint.
func WithHash ¶
WithHash sets the hashing algorithm that is applied on the input before creating the fingerprint.
func WithPrefix ¶
WithPrefix sets a prefix that is prepended to the generated fingerprint.
Click to show internal directories.
Click to hide internal directories.