Ed25519 seed representing a succession of bytes that can be used for
deterministic keypair generation. If the same seed is indicated in the
generator multiple times, the generated keys will be the same each time.
Note that this is not the seed added to Exonum transactions for additional
security, this is a separate entity. This structure is useful for testing,
to receive repeatable results. The seed in this structure is either set
manually or selected using the methods below.
The example below generates a pair of public and secret keys taking
into account the selected seed. The same seed will always lead to
generation of the same keypair.
use exonum::crypto::{self, SEED_LENGTH, Seed};
let (public_key, secret_key) = crypto::gen_keypair_from_seed(&Seed::new([1; SEED_LENGTH]));
Creates a new instance filled with zeros.
Creates a new instance from bytes array.
Creates a new instance from bytes slice.
Returns a hex representation of binary data.
Lower case letters are used (e.g. f9b4ca).
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
The returned type after indexing.
Performs the indexing (container[index]
) operation.
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
Writes the hex string representing self
into w
. Lower case letters are used (e.g. f9b4ca
). Read more
Writes the hex string representing self
into w
. Upper case letters are used (e.g. F9B4CA
). Read more
Creates an instance of type Self
from the given hex string, or fails with a custom error type. Read more
Serializes content of a transaction with the given serializer.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Compare self to key
and return true
if they are equal.
Writes the hex string representing self
into w
. Lower case letters are used (e.g. f9b4ca
). Read more
Writes the hex string representing self
into w
. Upper case letters are used (e.g. F9B4CA
). Read more