codec

package
v1.4.1-0...-0702f9d Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ECPrivKeyToPEM

func ECPrivKeyToPEM(privKey *btcec.PrivateKey) ([]byte, error)

func EncodeECParams

func EncodeECParams() ([]byte, error)

func EncodeECPrivKey

func EncodeECPrivKey(privKey *btcec.PrivateKey) ([]byte, error)

func EncodeECPubKey

func EncodeECPubKey(pubKey *btcec.PublicKey) ([]byte, error)

func IsSecp256k1

func IsSecp256k1(actual asn1.ObjectIdentifier) bool

func LoadECPrivKey

func LoadECPrivKey(identityFile string) (*btcec.PrivateKey, error)

func PEMToECPrivKey

func PEMToECPrivKey(data []byte) (*btcec.PrivateKey, error)

func Secp256k1

func Secp256k1() asn1.ObjectIdentifier

Types

type ECPrivKey

type ECPrivKey struct {
	Version       int
	PrivateKey    []byte
	NamedCurveOID asn1.ObjectIdentifier `asn1:"optional,explicit,tag:0"`
	PublicKey     asn1.BitString        `asn1:"optional,explicit,tag:1"`
}

type ECPubKey

type ECPubKey struct {
	Metadata  []asn1.ObjectIdentifier
	PublicKey asn1.BitString
}

Jump to

Keyboard shortcuts

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