Struct emerald_rs::keystore::KeyFile [] [src]

pub struct KeyFile {
    pub visible: Option<bool>,
    pub name: Option<String>,
    pub description: Option<String>,
    pub address: Address,
    pub uuid: Uuid,
    pub crypto: CryptoType,
}

A keystore file (account private core encrypted with a passphrase)

Fields

Specifies if Keyfile is visible

User specified name

User specified description

Address

UUID v4

Methods

impl KeyFile
[src]

[src]

Decode Keyfile from JSON Handles different variants of crypto section

impl KeyFile
[src]

[src]

Creates a new KeyFile with specified passphrase at random (rand::OsRng)

Arguments

  • passphrase - password for key derivation function

[src]

Creates a new KeyFile with specified PrivateKey, passphrase, key derivation function and with given custom random generator

Arguments

  • pk - a private key
  • passphrase - password for key derivation function
  • kdf - customized key derivation function
  • rnd - predefined random number generator

[src]

Decrypt public address from keystore file by a password

[src]

Decrypt private key from keystore file by a password

[src]

Encrypt a new private key for keystore file with a passphrase

[src]

Encrypt a new private key for keystore file with a passphrase and with given custom random generator

Trait Implementations

impl Into<KeyFile> for CoreCrypto
[src]

[src]

Performs the conversion.

impl Into<KeyFile> for SerializableKeyFileCore
[src]

[src]

Performs the conversion.

impl Into<KeyFile> for SerializableKeyFileHD
[src]

[src]

Performs the conversion.

impl Encodable for KeyFile
[src]

[src]

Serialize a value using an Encoder.

impl Debug for KeyFile
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for KeyFile
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for KeyFile
[src]

impl Default for KeyFile
[src]

[src]

Returns the "default value" for a type. Read more

impl From<Uuid> for KeyFile
[src]

[src]

Performs the conversion.

impl PartialEq for KeyFile
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialOrd for KeyFile
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for KeyFile
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Display for KeyFile
[src]

[src]

Formats the value using the given formatter. Read more

impl From<KeyFile> for AccountInfo
[src]

[src]

Performs the conversion.

impl Into<KeyFile> for HdwalletCrypto
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for KeyFile

impl Sync for KeyFile