keypair

package
v0.4.20-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPair

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

func FromBytes

func FromBytes(data []byte) (*KeyPair, error)

func FromPrivateKey

func FromPrivateKey(privateKey ed25519.PrivateKey) *KeyPair

func FromPublicKey

func FromPublicKey(publicKey ed25519.PublicKey) *KeyPair

func Generate

func Generate() (*KeyPair, error)

func (*KeyPair) Sign

func (kp *KeyPair) Sign(data []byte) []byte

func (*KeyPair) ToBytes

func (kp *KeyPair) ToBytes() ([]byte, error)

func (*KeyPair) Verify

func (kp *KeyPair) Verify(data []byte, signature []byte) bool

Jump to

Keyboard shortcuts

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