crypto

package
v0.0.0-...-a6ba2ba Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

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

func GeneratePrivateKey

func GeneratePrivateKey() PrivateKey

func NewPrivateKeyFromReader

func NewPrivateKeyFromReader(r io.Reader) PrivateKey

func (PrivateKey) PublicKey

func (k PrivateKey) PublicKey() PublicKey

func (PrivateKey) Sign

func (k PrivateKey) Sign(data []byte) (*Signature, error)

type PublicKey

type PublicKey []byte

func (PublicKey) Address

func (k PublicKey) Address() types.Address

func (PublicKey) String

func (k PublicKey) String() string

type Signature

type Signature struct {
	S *big.Int
	R *big.Int
}

func (Signature) String

func (sig Signature) String() string

func (Signature) Verify

func (sig Signature) Verify(pubKey PublicKey, data []byte) bool

Jump to

Keyboard shortcuts

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