verification

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBase64

func DecodeBase64(input string) ([]byte, error)

func EncodeBase64

func EncodeBase64(input []byte) string

Types

type Ed25519Keypair

type Ed25519Keypair struct {
	PubKey ed25519.PublicKey
	// contains filtered or unexported fields
}

func FromReader added in v1.15.0

func FromReader(reader io.ReadCloser) (*Ed25519Keypair, error)

func NewKeyPair

func NewKeyPair() (*Ed25519Keypair, error)

func PubkeyFromString

func PubkeyFromString(pub string) (*Ed25519Keypair, error)

func (*Ed25519Keypair) AsJson added in v1.14.0

func (keypair *Ed25519Keypair) AsJson() ([]byte, error)

func (*Ed25519Keypair) Sign

func (keypair *Ed25519Keypair) Sign(ip common.DnsRecord) string

func (*Ed25519Keypair) Verify

func (keypair *Ed25519Keypair) Verify(signature string, ip common.DnsRecord) bool

type SignatureKeypair

type SignatureKeypair interface {
	AsJson() ([]byte, error)
	Sign(ip common.DnsRecord) string
	VerificationKey
}

type VerificationKey

type VerificationKey interface {
	Verify(signature string, ip common.DnsRecord) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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