Struct aptos_crypto::test_utils::KeyPair
source · [−]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
sourceimpl<Priv, Pub> Debug for KeyPair<Priv, Pub> where
Priv: Serialize,
Pub: Serialize + for<'a> From<&'a Priv>,
impl<Priv, Pub> Debug for KeyPair<Priv, Pub> where
Priv: Serialize,
Pub: Serialize + for<'a> From<&'a Priv>,
sourceimpl<'de, S, P> Deserialize<'de> for KeyPair<S, P> where
for<'a> P: From<&'a S>,
S: Deserialize<'de>,
P: Deserialize<'de>,
impl<'de, S, P> Deserialize<'de> for KeyPair<S, P> where
for<'a> P: From<&'a S>,
S: Deserialize<'de>,
P: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<S: PartialEq, P: PartialEq> PartialEq<KeyPair<S, P>> for KeyPair<S, P> where
for<'a> P: From<&'a S>,
impl<S: PartialEq, P: PartialEq> PartialEq<KeyPair<S, P>> for KeyPair<S, P> where
for<'a> P: From<&'a S>,
sourceimpl<S, P> Serialize for KeyPair<S, P> where
for<'a> P: From<&'a S>,
S: Serialize,
P: Serialize,
impl<S, P> Serialize for KeyPair<S, P> where
for<'a> P: From<&'a S>,
S: Serialize,
P: Serialize,
sourceimpl<S, P> Uniform for KeyPair<S, P> where
S: Uniform,
for<'a> P: From<&'a S>,
impl<S, P> Uniform for KeyPair<S, P> where
S: Uniform,
for<'a> P: From<&'a S>,
sourcefn generate<R>(rng: &mut R) -> Self where
R: RngCore + CryptoRng,
fn generate<R>(rng: &mut R) -> Self where
R: RngCore + CryptoRng,
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
sourcefn generate_for_testing() -> Self where
Self: Sized,
fn generate_for_testing() -> Self where
Self: Sized,
Generate a random key using the shared TEST_SEED
impl<S: Eq, P: Eq> Eq for KeyPair<S, P> where
for<'a> P: From<&'a S>,
impl<S, P> StructuralEq for KeyPair<S, P> where
for<'a> P: From<&'a S>,
impl<S, P> StructuralPartialEq for KeyPair<S, P> where
for<'a> P: From<&'a S>,
Auto Trait Implementations
impl<S, P> RefUnwindSafe for KeyPair<S, P> where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, P> Send for KeyPair<S, P> where
P: Send,
S: Send,
impl<S, P> Sync for KeyPair<S, P> where
P: Sync,
S: Sync,
impl<S, P> Unpin for KeyPair<S, P> where
P: Unpin,
S: Unpin,
impl<S, P> UnwindSafe for KeyPair<S, P> where
P: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
sourcefn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.