Struct diem_sdk::crypto::test_utils::KeyPair [−][src]
Expand description
A keypair consisting of a private and public key
Fields
private_key: Sthe private key component
public_key: Pthe public key component
Trait Implementations
impl<'de, S, P> Deserialize<'de> for KeyPair<S, P> where
S: Deserialize<'de>,
P: for<'a> From<&'a S> + Deserialize<'de>,
impl<'de, S, P> Deserialize<'de> for KeyPair<S, P> where
S: Deserialize<'de>,
P: for<'a> From<&'a S> + Deserialize<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<KeyPair<S, P>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<KeyPair<S, P>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Generate key material from an RNG. This should generally not be used for production purposes even with a good source of randomness. When possible use hardware crypto to generate and store private keys. Read more
Generate a random key using the shared TEST_SEED
Auto Trait Implementations
impl<S, P> RefUnwindSafe for KeyPair<S, P> where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, P> UnwindSafe for KeyPair<S, P> where
P: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
Generates a hash used only for tests.