ecdsa

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ecdsa provides a mockable wrapper for crypto/ecdsa.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) GenerateKey

func (*Impl) GenerateKey(c elliptic.Curve, rand io.Reader) (*ecdsa.PrivateKey, error)

func (*Impl) Sign

func (*Impl) Sign(rand io.Reader, priv *ecdsa.PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)

func (*Impl) SignASN1

func (*Impl) SignASN1(rand io.Reader, priv *ecdsa.PrivateKey, hash []byte) ([]byte, error)

func (*Impl) Verify

func (*Impl) Verify(pub *ecdsa.PublicKey, hash []byte, r *big.Int, s *big.Int) bool

func (*Impl) VerifyASN1

func (*Impl) VerifyASN1(pub *ecdsa.PublicKey, hash []byte, sig []byte) bool

type Interface

type Interface interface {
	GenerateKey(c elliptic.Curve, rand io.Reader) (*ecdsa.PrivateKey, error)
	Sign(rand io.Reader, priv *ecdsa.PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)
	SignASN1(rand io.Reader, priv *ecdsa.PrivateKey, hash []byte) ([]byte, error)
	Verify(pub *ecdsa.PublicKey, hash []byte, r *big.Int, s *big.Int) bool
	VerifyASN1(pub *ecdsa.PublicKey, hash []byte, sig []byte) bool
}

Jump to

Keyboard shortcuts

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