pub struct Stronghold { /* private fields */ }
Available on crate feature account only.
Expand description

The implementation of the Storage interface using Stronghold.

Stronghold is a secure storage for sensitive data. Secrets that are stored inside a Stronghold can never be read, but only be accessed via cryptographic procedures. Data written into a Stronghold is persisted in snapshots which are encrypted using the provided password.

Implementations

Constructs a Stronghold storage instance.

Arguments:

  • path: path to a local Stronghold snapshot file. Will be created if it does not exist.
  • password: password for the Stronghold snapshot file. If this is cloned from a reference, zeroization of that reference is strongly recommended.
  • dropsave: persist all changes when the instance is dropped. Default: true.

Returns whether dropsave is enabled.

Sets whether dropsave is enabled.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Creates a new identity for the given network. Read more

Removes the keys and any other state for the given did. Read more

Returns true if did exists in the list of stored DIDs.

Returns the list of stored DIDs.

Generates a new key for the given did with the given key_type and fragment identifier and returns the location of the newly generated key. Read more

Inserts a private key at the specified location. Read more

Retrieves the public key from location.

Deletes the key at location. Read more

Signs data with the private key at the specified location.

Returns true if a key exists at the specified location.

Encrypts the given plaintext with the specified encryption_algorithm and cek_algorithm. Read more

Decrypts the given data with the specified encryption_algorithm and cek_algorithm. Read more

Returns the chain state of the identity specified by did.

Set the chain state of the identity specified by did.

Returns the IotaDocument of the identity specified by did.

Sets a new state for the identity specified by did.

Persists any unsaved changes.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more