keystore

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 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)

type EncryptedKeyJSONV3 added in v0.106.1

type EncryptedKeyJSONV3 struct {
	Address         string     `json:"address"`
	Crypto          CryptoJSON `json:"crypto"`
	Id              string     `json:"id"`
	Version         int        `json:"version"`
	ExtendedKey     CryptoJSON `json:"extendedkey"`
	SubAccountIndex uint32     `json:"subaccountindex"`
}

Jump to

Keyboard shortcuts

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