security

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SignatureAlgorithm = "ed25519"

Variables

This section is empty.

Functions

func CanonicalJSON

func CanonicalJSON(value any) (string, error)

func CanonicalJSONDigestFromBytes

func CanonicalJSONDigestFromBytes(body []byte) (string, error)

func ClientKeyID

func ClientKeyID(publicKeyPEM string) string

func PublicKeyFingerprint

func PublicKeyFingerprint(publicKeyPEM string) (string, error)

func SHA256Base64URL

func SHA256Base64URL(value string) string

func SignPayload

func SignPayload(privateKeyPEM string, payload string) (string, error)

func StableGatewayID

func StableGatewayID(bindingAudience string) string

func VerifySignature

func VerifySignature(publicKeyPEM string, payload string, signature string) bool

Types

type KeyPair

type KeyPair struct {
	PublicKeyPEM  string
	PrivateKeyPEM string
}

func GenerateKeyPair

func GenerateKeyPair() (KeyPair, error)

Jump to

Keyboard shortcuts

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