verification

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 8 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

func ToFile

func ToFile(path string, keypair *Ed25519Keypair) error

Types

type Ed25519Keypair

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

func FromFile

func FromFile(path string) (*Ed25519Keypair, error)

func NewKeyPair

func NewKeyPair() (*Ed25519Keypair, error)

func (*Ed25519Keypair) Sign

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

func (*Ed25519Keypair) Verify

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

type SignatureKeypair

type SignatureKeypair interface {
	Sign(ip common.ResolvedIp) string
	VerificationKey
}

type VerificationKey

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

func PubkeyFromString

func PubkeyFromString(pub string) (VerificationKey, error)

TODO: Test with garbage input

Jump to

Keyboard shortcuts

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