eddsa

package
v1.96.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const Name = "EdDSA"

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method struct {
	PrivateKey ed25519.PrivateKey
	PublicKey  ed25519.PublicKey
}

func FromPem

func FromPem(pemKey string) (*Method, error)

func (*Method) GetName

func (method *Method) GetName() string

func (*Method) GoString added in v1.86.0

func (method *Method) GoString() string

GoString writes the method out without its private key, and String and MarshalText write the same.

A method is attached to errors and so to log entries -- as the verifier of a token that was refused, the signer of one that failed to encode -- and every way a value is written out would otherwise write the key along with it: %#v and %v print the key's bytes, a JSON encoder its base64. The public key is kept, being what tells one method from another in a log.

func (*Method) MarshalText added in v1.86.0

func (method *Method) MarshalText() ([]byte, error)

func (*Method) Sign

func (method *Method) Sign(message []byte) ([]byte, error)

func (*Method) String added in v1.86.0

func (method *Method) String() string

func (*Method) Verify

func (method *Method) Verify(message []byte, signature []byte) error

Jump to

Keyboard shortcuts

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