irishmac

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderIrisTimestamp        = "X-Iris-Timestamp"
	HeaderIrisNonce            = "X-Iris-Nonce"
	HeaderIrisSignature        = "X-Iris-Signature"
	HeaderIrisBodySHA256       = "X-Iris-Body-Sha256"
	HeaderIrisMessageID        = "X-Iris-Message-Id"
	HeaderIrisSignatureVersion = "X-Iris-Signature-Version"
	SignatureVersionV2         = "v2"
)
View Source
const EmptyBodySHA256Hex = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Variables

This section is empty.

Functions

func CanonicalRequest

func CanonicalRequest(method, target, timestamp, nonce, bodySHA256 string) string

func CanonicalTarget

func CanonicalTarget(target string) (string, error)

func CanonicalWebhookRequestV2 added in v0.32.0

func CanonicalWebhookRequestV2(method, target, timestamp, nonce, messageID, bodySHA256 string) string

func EncodeQueryComponent

func EncodeQueryComponent(value string) string

func NewMAC

func NewMAC(key []byte) hash.Hash

func SHA256HexBytes

func SHA256HexBytes(body []byte) string

func SignCanonical

func SignCanonical(signer *Signer, method, target, timestamp, nonce, bodySHA256 string) (string, error)

func SignHash

func SignHash(mac hash.Hash, canonical string) string

Types

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner(secret string) *Signer

func (*Signer) Sign

func (s *Signer) Sign(canonical string) string

Jump to

Keyboard shortcuts

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