signature

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSignVerification = errors.New("verification error")
)
View Source
var (
	ErrSigning = errors.New("sign error")
)

Functions

This section is empty.

Types

type ECCSigner

type ECCSigner struct {
	hasher.Hasher
	// contains filtered or unexported fields
}

func (*ECCSigner) Sign

func (s *ECCSigner) Sign() ([]byte, error)

type ECCVerifier

type ECCVerifier struct {
	hasher.Hasher
	// contains filtered or unexported fields
}

func (*ECCVerifier) LoadECCKey

func (v *ECCVerifier) LoadECCKey(data []byte) error

func (*ECCVerifier) Verify

func (v *ECCVerifier) Verify(sig []byte) error

type Signer

type Signer interface {
	hasher.Hasher
	Sign() ([]byte, error)
}

func NewECCSigner

func NewECCSigner(hashFn func() hash.Hash, c elliptic.Curve, signLen int, key *ecdsa.PrivateKey) Signer

type SignerFunc

type SignerFunc func(hashFn func() hash.Hash, c elliptic.Curve, signLen int, key *ecdsa.PrivateKey) Signer

type Verifier

type Verifier interface {
	hasher.Hasher
	Verify(sig []byte) error
	LoadECCKey(data []byte) error
}

func NewECCVerifier

func NewECCVerifier(hashFn func() hash.Hash, c elliptic.Curve) Verifier

type VerifierFunc

type VerifierFunc func(hashFn func() hash.Hash, c elliptic.Curve) Verifier

Jump to

Keyboard shortcuts

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