Crate eth_keystore

Source
Expand description

A minimalist library to interact with encrypted JSON keystores as per the Web3 Secret Storage Definition.

Structs§

Enums§

  • Types of key derivition functions supported by the Web3 Secret Storage.
  • Defines the various parameters used in the supported KDFs.
  • An error thrown when interacting with the eth-keystore crate.

Functions§

  • Decrypts an encrypted JSON keystore at the provided path using the provided password. Decryption supports the Scrypt and PBKDF2 key derivation functions.
  • 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.
  • 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 Uuid id.