privatekey

package
v0.0.0-...-f0b43a4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

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

Returns the private key from a given PEM-Encoded byte slice representation of the private key

func Encode

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

Returns the PEM-Encoded byte slice from a given private key

func GenerateNRandomKeys

func GenerateNRandomKeys(filename string, n uint32) error

Generates n random keys and writes them to the file at filename

Types

type AurumPrivateKey

type AurumPrivateKey struct {
	Key   *ecdsa.PrivateKey
	Bytes []byte
	Hex   string
}

func New

func New() (AurumPrivateKey, error)

func (AurumPrivateKey) Equals

func (pvKey AurumPrivateKey) Equals(pvKey2 *ecdsa.PrivateKey) bool

Equals returns true if the given two *ecdsa.PrivateKey are equal

Jump to

Keyboard shortcuts

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