canon

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonicalize

func Canonicalize(input []byte, domain Domain) ([]byte, error)

func DigestHMACHex

func DigestHMACHex(input []byte, domain Domain, secret []byte) (string, error)

func DigestHex

func DigestHex(input []byte, domain Domain) (string, error)

Types

type Digest

type Digest struct {
	AlgoID string `json:"algo_id"`
	Value  string `json:"value"`
	SaltID string `json:"salt_id,omitempty"`
}

func DigestHMACInfo

func DigestHMACInfo(input []byte, domain Domain, secret []byte, saltID string) (Digest, error)

func DigestInfo

func DigestInfo(input []byte, domain Domain, saltID string) (Digest, error)

type Domain

type Domain string
const (
	DomainJSON   Domain = "json"
	DomainSQL    Domain = "sql"
	DomainURL    Domain = "url"
	DomainText   Domain = "text"
	DomainPrompt Domain = "prompt"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL