crypto

package
v0.0.0-...-e59846b Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Secp256k1Generator

type Secp256k1Generator struct{}

Secp256k1Generator provides secp256k1 operations

func NewSecp256k1Generator

func NewSecp256k1Generator() *Secp256k1Generator

NewSecp256k1Generator creates a secp256k1 generator

func (*Secp256k1Generator) Generate

func (s *Secp256k1Generator) Generate() (pubKey, privKey []byte)

Generate returns generated pubKey and privKey

func (*Secp256k1Generator) Sign

func (s *Secp256k1Generator) Sign(msg, privKey []byte) ([]byte, error)

Sign creates a recoverable ECDSA signature

func (*Secp256k1Generator) Verify

func (s *Secp256k1Generator) Verify(pubKey, msg, signature []byte) bool

Verify checks that the given pubKey created signature over msg

Jump to

Keyboard shortcuts

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