Documentation
¶
Overview ¶
Package hashutil provides deterministic content hashing used across Radius to generate stable identifiers and change-detection tokens (for example resource names, ETags, and configuration hashes).
These hashes are NOT used for cryptographic or security purposes. They exist only to produce unique, deterministic values and to detect whether content has changed.
New values must be produced with Hex (SHA-256). The legacy SHA-1 helper exists only so that Radius can recognize values written by older versions while they are migrated to SHA-256; see https://github.com/radius-project/radius/issues/8084.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hex ¶
Hex returns the SHA-256 hash of data encoded as a lowercase hexadecimal string.
This is the hashing function that should be used for all new values.
func LegacyHex ¶
LegacyHex returns the SHA-1 hash of data encoded as a lowercase hexadecimal string.
SHA-1 is cryptographically broken and is retained only so that Radius can recognize values written by older versions during the migration to SHA-256. Use Hex for all new values; do not use LegacyHex to produce new values.
Types ¶
This section is empty.