ecdsa

package
v0.0.0-...-e20b906 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(priv *ecdsa.PrivateKey, msg []byte) ([]byte, error)

Sign calculates the signature of msg using ECDSA. The opts argument may be nil, in which case sensible defaults are used. Warning, msg will be hashed with SHA-256. It returns asn1.encode(r.Bytes(), s.Bytes()).

func Verify

func Verify(pub *ecdsa.PublicKey, sig, msg []byte) error

Verify verifies the signature sig of msg using the public key pub. A valid signature is indicated by returning a nil error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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