crypto

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ed25519KeyPair

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

func NewEd25519KeyPair

func NewEd25519KeyPair(privateKey ed25519.PrivateKey) *Ed25519KeyPair

func (*Ed25519KeyPair) PrivateKey

func (e *Ed25519KeyPair) PrivateKey() []byte

func (*Ed25519KeyPair) PublicKey

func (e *Ed25519KeyPair) PublicKey() []byte

func (*Ed25519KeyPair) Sign

func (e *Ed25519KeyPair) Sign(msg []byte) []byte

type KeyPair

type KeyPair interface {
	Sign(msg []byte) []byte
	PublicKey() []byte
	PrivateKey() []byte
}

type Signer

type Signer[T any] interface {
	Sign(msg []byte) T
}

Jump to

Keyboard shortcuts

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