secp256k1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrivateKeyToECDSA

func PrivateKeyToECDSA(pk keys.PrivateKey) (*ecdsa.PrivateKey, error)

TODO: hang off key object instead

func PrivateKeyToECIES

func PrivateKeyToECIES(pk keys.PrivateKey) (*ecies.PrivateKey, error)

TODO: hang off key object instead

func PublicKeyToECIES

func PublicKeyToECIES(pk keys.PublicKey) (*ecies.PublicKey, error)

TODO: hang off object instead

Types

type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields
}

PrivateKey based on the secp256k1 curve

func PrivateKeyFromBytes

func PrivateKeyFromBytes(pk []byte) (*PrivateKey, error)

PrivateKeyFromBytes get a private key from []byte

func PrivateKeyFromECDSA

func PrivateKeyFromECDSA(pk ecdsa.PrivateKey) PrivateKey

PrivateKeyFromECDSA get a private key from an ecdsa.PrivateKey

func PrivateKeyFromHex

func PrivateKeyFromHex(hexkey string) (*PrivateKey, error)

PrivateKeyFromHex get a private key from hex string

func (PrivateKey) Bytes

func (pk PrivateKey) Bytes() []byte

Bytes returns the byte representation of the private key

func (PrivateKey) PublicKey

func (pk PrivateKey) PublicKey() keys.PublicKey

PublicKey return the public key that is derived from the private key

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

PublicKey based on the secp256k1 curve

func PublicKeyFromBytes

func PublicKeyFromBytes(pk []byte) (*PublicKey, error)

PublicKeyFromBytes create a public key from []byte

func PublicKeyFromHex

func PublicKeyFromHex(hex string) (*PublicKey, error)

PublicKeyFromHex create a public key from hex

func (PublicKey) Address

func (pk PublicKey) Address() []byte

Address returns the byte representation of the address

func (PublicKey) Bytes

func (pk PublicKey) Bytes() []byte

Bytes returns the byte representation of the public key

Jump to

Keyboard shortcuts

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