crypto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Curve = "P256"
)

Variables

This section is empty.

Functions

func MarshalPK

func MarshalPK(pk ecdsa.PublicKey) []byte

func UnMarshalPK

func UnMarshalPK(b []byte) *ecdsa.PublicKey

Types

type Secret

type Secret struct {
	S *ecdsa.PrivateKey
}

func GenerateKey

func GenerateKey() (*Secret, error)

type Signature

type Signature struct {
	H []byte  `json:"hash"`
	R big.Int `json:"r"`
	S big.Int `json:"s"`
}

func NewSignature

func NewSignature(r, s *big.Int, h []byte) *Signature

func (*Signature) Marshal

func (this *Signature) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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