ecdsa

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var P256Curve = elliptic.P256()

Functions

func ExportPrivateKey

func ExportPrivateKey(privateKey *ecdsa.PrivateKey) (string, error)

Helper-function for exporting ecdsa.PrivateKey to PEM string

func ExportPublicKey

func ExportPublicKey(publicKey *ecdsa.PublicKey) (string, error)

Helper-function for exporting ecdsa.PublicKey from PEM string

func GeneratePrivateKey

func GeneratePrivateKey() (*ecdsa.PrivateKey, error)

func ImportPrivateKey

func ImportPrivateKey(pemEncoded string) (*ecdsa.PrivateKey, error)

Helper-function for importing ecdsa.PrivateKey from PEM string

func ImportPublicKey

func ImportPublicKey(pemPubEncoded string) (*ecdsa.PublicKey, error)

Helper-function for importing ecdsa.PublicKey from PEM string

func Sign

func Sign(data []byte, key *ecdsa.PrivateKey) ([]byte, error)

Sign signs given seed

func Verify

func Verify(seed []byte, signatureRaw []byte, pubKey string) (bool, error)

Verifies signature

Types

This section is empty.

Jump to

Keyboard shortcuts

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