keytools

package
v0.0.0-...-571fd38 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package keytools is the module to reuse the key pair

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLocalKey

func CreateLocalKey(filename, password string) *secp256k1.PrivateKey

CreateLocalKey will create a keyfile named *filename* and encrypted with *password* in aes-256-gcm.

func GetDefaultFile

func GetDefaultFile() string

GetDefaultFile returns the default location storing keyfile.

func GetDefaultFolder

func GetDefaultFolder() string

GetDefaultFolder returns the default folder storing keyfile.

func GetP2PKey

func GetP2PKey(path string) crypto.PrivKey

func NewLocalKey

func NewLocalKey() *secp256k1.PrivateKey

NewLocalKey will create a privateKey only.

func PrintKeysAndAddress

func PrintKeysAndAddress(privateKey *secp256k1.PrivateKey)

PrintKeysAndAddress will print the **privateKey and its publicKey** to the console.

func ReadLocalKey

func ReadLocalKey(filename string, password string) *secp256k1.PrivateKey

ReadLocalKey will read the local AES-256-GCM encrypted secp256k1 key file to load an ecdsa private key.

func RecoverLocalKey

func RecoverLocalKey(filename, password, privateKey string) *secp256k1.PrivateKey

RecoverLocalKey will recover a keyfile named *filename* with the password from the privateKey string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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