Expand description
A minimalist library to interact with encrypted JSON keystores as per the Web3 Secret Storage Definition.
Structs§
- Cipherparams
Json - Represents the “cipherparams” part of an encrypted JSON keystore.
- Crypto
Json - Represents the “crypto” part of an encrypted JSON keystore.
- EthKeystore
- This struct represents the deserialized form of an encrypted JSON keystore based on the Web3 Secret Storage Definition.
Enums§
- KdfType
- Types of key derivition functions supported by the Web3 Secret Storage.
- Kdfparams
Type - Defines the various parameters used in the supported KDFs.
- Keystore
Error - An error thrown when interacting with the eth-keystore crate.
Functions§
- decrypt_
key - Decrypts an encrypted JSON keystore at the provided
path
using the providedpassword
. Decryption supports the Scrypt and PBKDF2 key derivation functions. - encrypt_
key - Encrypts the given private key using the Scrypt
password-based key derivation function, and stores it in the provided directory. On success, it
returns the
id
(Uuid) generated for this keystore. - new
- Creates a new JSON keystore using the Scrypt
key derivation function. The keystore is encrypted by a key derived from the provided
password
and stored in the provided directory with either the user-provided filename, or a generated Uuidid
.