keystore

package
v0.89.12 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDecrypt = errors.New("could not decrypt key with given password")
)

Functions

func DecryptDataV3

func DecryptDataV3(cryptoJson CryptoJSON, auth string) ([]byte, error)

func DecryptKey

func DecryptKey(keyjson []byte, auth string) (*types.Key, error)

DecryptKey decrypts a key from a json blob, returning the private key itself.

Types

type CryptoJSON

type CryptoJSON struct {
	Cipher       string                 `json:"cipher"`
	CipherText   string                 `json:"ciphertext"`
	CipherParams cipherparamsJSON       `json:"cipherparams"`
	KDF          string                 `json:"kdf"`
	KDFParams    map[string]interface{} `json:"kdfparams"`
	MAC          string                 `json:"mac"`
}

func RawKeyToCryptoJSON added in v0.80.2

func RawKeyToCryptoJSON(rawKeyFile []byte) (cj CryptoJSON, e error)

Jump to

Keyboard shortcuts

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