Documentation
¶
Overview ¶
Package hash provides SHA-256 and xxHash helpers for message and content hashing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesHash ¶ added in v0.1.1
BytesHash returns a SHA256 hash of the given bytes as a hex string. Returns empty string if input is empty.
func SHA256String ¶ added in v0.1.1
SHA256String computes the SHA-256 hash, returns the raw 32-byte array
func WriteBool ¶
WriteBool writes a boolean value to the hash in a deterministic format (1 for true, 0 for false).
func WriteFloat32 ¶
WriteFloat32 writes a float32 value to the hash by converting it to its IEEE 754 binary representation.
func WriteInt64 ¶
WriteInt64 writes an int64 value to the hash in little-endian format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.