pub struct KeyPair<S, P>{
pub private_key: S,
pub public_key: P,
}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§
Source§impl<'de, S, P> Deserialize<'de> for KeyPair<S, P>
impl<'de, S, P> Deserialize<'de> for KeyPair<S, P>
Source§fn 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
impl<S: Eq, P> Eq for KeyPair<S, P>
impl<S: PartialEq, P> StructuralPartialEq for KeyPair<S, P>
Source§impl<S, P> Uniform for KeyPair<S, P>
impl<S, P> Uniform for KeyPair<S, P>
Source§fn generate<R>(rng: &mut R) -> Self
fn generate<R>(rng: &mut R) -> Self
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.
Source§fn generate_for_testing() -> Selfwhere
Self: Sized,
fn generate_for_testing() -> Selfwhere
Self: Sized,
Generate a random key using the shared TEST_SEED
Auto Trait Implementations§
impl<S, P> Freeze for KeyPair<S, P>
impl<S, P> RefUnwindSafe for KeyPair<S, P>where
S: RefUnwindSafe,
P: RefUnwindSafe,
impl<S, P> Send for KeyPair<S, P>
impl<S, P> Sync for KeyPair<S, P>
impl<S, P> Unpin for KeyPair<S, P>
impl<S, P> UnsafeUnpin for KeyPair<S, P>where
S: UnsafeUnpin,
P: UnsafeUnpin,
impl<S, P> UnwindSafe for KeyPair<S, P>where
S: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TestOnlyHash for T
impl<T> TestOnlyHash for T
Source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.