Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyChecksum indicates the provided checksum string is empty. ErrEmptyChecksum = errors.New("empty checksum string") // ErrUnsupportedChecksumEncoding indicates the checksum string is not a supported encoding. ErrUnsupportedChecksumEncoding = errors.New("unsupported checksum encoding") )
Functions ¶
func CanonicalHexSHA256 ¶
CanonicalHexSHA256 decodes the input checksum and re-encodes it as a lowercase hexadecimal string.
func DecodeSHA256String ¶
DecodeSHA256String attempts to decode the provided checksum string which may be hex-encoded or base64/base64url-encoded. It returns the raw 32-byte digest.
func EqualSHA256 ¶
EqualSHA256 reports whether the provided checksum string (hex or base64) matches the supplied SHA256 digest.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.