key

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptKey

func EncryptKey(key *Key, auth, label string) ([]byte, error)

EncryptKey encrypts a key and returns the encrypted byte array

func EncryptKeyFile

func EncryptKeyFile(key *Key, filePath, auth, label string) error

func VerifyFile added in v0.3.0

func VerifyFile(filePath string) (crypto.Address, bool)

Types

type Key

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

func DecryptKey

func DecryptKey(bs []byte, auth string) (*Key, error)

DecryptKey decrypts the Key from a json blob and returns the plaintext of the private key

func DecryptKeyFile

func DecryptKeyFile(filePath, auth string) (*Key, error)

DecryptKeyFile decrypts the file and returns Key

func GenAccountKey

func GenAccountKey() *Key

func GenValidatorKey

func GenValidatorKey() *Key

func NewKey

func NewKey(addr crypto.Address, pv crypto.PrivateKey) (*Key, error)

func (*Key) Address

func (k *Key) Address() crypto.Address

func (*Key) PrivateKey

func (k *Key) PrivateKey() crypto.PrivateKey

func (*Key) PublicKey

func (k *Key) PublicKey() crypto.PublicKey

Jump to

Keyboard shortcuts

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