ed25519

package
v1.326.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(NewAlgo),
)

Module for fx.

Functions

func Generate

func Generate() (string, string, error)

Generate key pair with Ed25519.

func IsEnabled

func IsEnabled(cfg *Config) bool

IsEnabled for ed25519.

Types

type Algo

type Algo interface {
	algo.Signer

	// PublicKey for ed25519.
	PublicKey() ed25519.PublicKey

	// PrivateKey for ed25519.
	PrivateKey() ed25519.PrivateKey
}

Algo for ed25519.

func NewAlgo

func NewAlgo(cfg *Config) (Algo, error)

NewAlgo for ed25519.

type Config

type Config struct {
	Public  string `yaml:"public,omitempty" json:"public,omitempty" toml:"public,omitempty"`
	Private string `yaml:"private,omitempty" json:"private,omitempty" toml:"private,omitempty"`
}

Config for ed25519.

func (*Config) PrivateKey added in v1.214.1

func (c *Config) PrivateKey() (ed25519.PrivateKey, error)

PrivateKey ed25519.

func (*Config) PublicKey added in v1.214.1

func (c *Config) PublicKey() (ed25519.PublicKey, error)

PublicKey ed25519.

type None added in v1.324.0

type None struct {
	algo.Signer
}

None for ed25519.

func (*None) PrivateKey added in v1.324.0

func (a *None) PrivateKey() ed25519.PrivateKey

PrivateKey for none.

func (*None) PublicKey added in v1.324.0

func (a *None) PublicKey() ed25519.PublicKey

PublicKey for none.

Jump to

Keyboard shortcuts

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