tsig

package
v0.0.0-...-9e6ca78 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HmacAlgorithm

type HmacAlgorithm int
const (
	HmacUnsupported HmacAlgorithm = iota
	HmacSHA1
	HmacSHA224
	HmacSHA256
	HmacSHA384
	HmacSHA512
)

func NewHmac

func NewHmac(algorithm string) (HmacAlgorithm, error)

func (HmacAlgorithm) Sum

func (alg HmacAlgorithm) Sum(msg []byte, key []byte) ([]byte, error)

type TsigKey

type TsigKey []byte

func (TsigKey) ToBase64

func (k TsigKey) ToBase64() string

type TsigKeyring

type TsigKeyring map[string]TsigKey

func NewTsigKeyring

func NewTsigKeyring() TsigKeyring

func (TsigKeyring) AddEncodedKey

func (keyring TsigKeyring) AddEncodedKey(name string, key string) error

func (TsigKeyring) AddKey

func (keyring TsigKeyring) AddKey(name string, key []byte) error

func (TsigKeyring) HasKey

func (keyring TsigKeyring) HasKey(name string) bool

func (TsigKeyring) Key

func (keyring TsigKeyring) Key(name string) TsigKey

type TsigProvider

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

func NewTsigProvider

func NewTsigProvider(keyring *TsigKeyring, logger *zap.SugaredLogger) *TsigProvider

func (*TsigProvider) Generate

func (p *TsigProvider) Generate(msg []byte, t *miekgdns.TSIG) ([]byte, error)

func (*TsigProvider) Verify

func (p *TsigProvider) Verify(msg []byte, t *miekgdns.TSIG) error

Jump to

Keyboard shortcuts

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