alg_ed25519

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

package alg_ed25519 provides a signer and verifier for ed25519

Index

Constants

View Source
const Ed25519Alg = "ed25519"

Variables

This section is empty.

Functions

This section is empty.

Types

type Ed25519

type Ed25519 struct {
	PrivateKey ed25519.PrivateKey
	PublicKey  ed25519.PublicKey
	Attrs      any
}

func (Ed25519) Attributes

func (a Ed25519) Attributes() any

func (Ed25519) ContentDigest

func (a Ed25519) ContentDigest() contentdigest.Digester

func (Ed25519) Sign

func (a Ed25519) Sign(ctx context.Context, base string) ([]byte, error)

func (Ed25519) Type

func (a Ed25519) Type() string

func (Ed25519) Verify

func (a Ed25519) Verify(ctx context.Context, base string, sig []byte) error

type SingleKeyDirectory

type SingleKeyDirectory struct {
	Key        ed25519.PublicKey
	Attributes any
}

SingleKeyDirectory implements the verifier.KeyDirectory interface. It returns a static key regardless of the provided Key ID argument.

func (SingleKeyDirectory) GetKey

Jump to

Keyboard shortcuts

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