signer

package
v0.0.0-...-7016494 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	PublicKey []byte
	Curve     crv.Curve
	Encoder   enc.Encoder
	// contains filtered or unexported fields
}

func New

func New(privateKey []byte, curve crv.Curve, encoder enc.Encoder) (*Signer, error)

func (*Signer) ECDH

func (s *Signer) ECDH(publicKey []byte) ([]byte, error)

func (*Signer) PrivateKey

func (s *Signer) PrivateKey() []byte

func (*Signer) Sign

func (s *Signer) Sign(message string) ([]byte, error)

func (*Signer) Verify

func (s *Signer) Verify(pubBytes []byte, data []byte, sigBytes []byte) bool

Jump to

Keyboard shortcuts

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