crypto

package
v0.0.0-...-e5e0bb6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrivateKeySlice

func NewPrivateKeySlice() *privateKeySlice

Types

type Address

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

func (*Address) Bytes

func (a *Address) Bytes() *[20]byte

func (*Address) Reset

func (a *Address) Reset()

func (*Address) String

func (a *Address) String() string

type PrivateKey

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

func NewPrivateKey

func NewPrivateKey() *PrivateKey

func NewPrivateKeyFromSeed

func NewPrivateKeyFromSeed[T Seed](seed T) *PrivateKey

func (*PrivateKey) Bytes

func (p *PrivateKey) Bytes() ed25519.PrivateKey

func (*PrivateKey) Public

func (p *PrivateKey) Public() *PublicKey

func (*PrivateKey) Sign

func (p *PrivateKey) Sign(msg []byte) *Signature

type PublicKey

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

func NewPublicKey

func NewPublicKey(key ed25519.PublicKey) *PublicKey

func (*PublicKey) Address

func (p *PublicKey) Address() *Address

func (*PublicKey) Bytes

func (p *PublicKey) Bytes() ed25519.PublicKey

type PublicKeySlice

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

func NewPublicKeySlice

func NewPublicKeySlice(key ed25519.PublicKey) *PublicKeySlice

func (*PublicKeySlice) AddressSlice

func (p *PublicKeySlice) AddressSlice() *addressSlice

func (*PublicKeySlice) BytesSlice

func (p *PublicKeySlice) BytesSlice() ed25519.PublicKey

type Seed

type Seed interface {
	~[]byte | ~string
}

type Signature

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

func (*Signature) Bytes

func (s *Signature) Bytes() *[64]byte

func (*Signature) Reset

func (s *Signature) Reset()

func (*Signature) Verify

func (s *Signature) Verify(pubKey *PublicKey, msg []byte) bool

Jump to

Keyboard shortcuts

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