eddsa

package
v0.2.16 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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SigID = "eddsa"
)

Variables

This section is empty.

Functions

func RegisterSigner

func RegisterSigner(algs h2signer.SigningKeyAlgs)

RegisterSigner registers a signer alg

func RegisterVerifier

func RegisterVerifier(algs h2signer.VerifierKeyAlgs)

RegisterVerifier registers a verifier alg

Types

type Config

type Config struct {
	Key ed25519.PrivateKey
}

func NewConfig

func NewConfig() (*Config, error)

func ParseConfig

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

func (Config) String

func (c Config) String() (string, error)

type Key

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

Key implements SigningKey for ED25519 EdDSA

func New

func New(config Config) (*Key, error)

func NewFromParams

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

NewFromParams creates an ED25519 EdDSA key from params

func (*Key) Alg

func (k *Key) Alg() string

func (*Key) Private

func (k *Key) Private() any

func (*Key) Verifier added in v0.2.8

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

type PubConfig

type PubConfig struct {
	Pub ed25519.PublicKey
}

func ParsePubConfig

func ParsePubConfig(params string) (*PubConfig, error)

func (PubConfig) String

func (c PubConfig) String() (string, error)

type PubKey

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

PubKey implements VerifierKey for ED25519 EdDSA

func NewPubKey

func NewPubKey(config PubConfig) (*PubKey, error)

func VerifierFromParams

func VerifierFromParams(params string) (*PubKey, error)

VerifierFromParams creates an ED25519 EdDSA verifier from params

func (*PubKey) Alg

func (k *PubKey) Alg() string

func (*PubKey) ID

func (k *PubKey) ID() string

func (*PubKey) Public

func (k *PubKey) Public() any

Jump to

Keyboard shortcuts

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