hmacsig

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SigID = "hmac"
)

Variables

This section is empty.

Functions

func Register

func Register(algs h2signer.SigningKeyAlgs)

Register registers a signer alg

func RegisterVerifier

func RegisterVerifier(algs h2signer.VerifierKeyAlgs)

RegisterVerifier registers a verifier alg

Types

type Config

type Config struct {
	Key []byte
}

func NewConfig

func NewConfig() (*Config, error)

func ParseConfig

func ParseConfig(params string) (*Config, error)

ParseConfig loads an HS256 config from params string

func (Config) String

func (c Config) String() string

type Key

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

Key implements h2signer.SigningKey for HS256

func New

func New(config Config) *Key

func NewFromParams

func NewFromParams(params string) (*Key, error)

NewFromParams creates an HS256 key from params

func (*Key) Alg

func (k *Key) Alg() string

func (*Key) ID

func (k *Key) ID() string

func (*Key) Private

func (k *Key) Private() any

func (*Key) Public

func (k *Key) Public() any

func (*Key) Verifier

func (k *Key) Verifier() h2signer.VerifierKey

Jump to

Keyboard shortcuts

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