[−][src]Struct rust_ipv8::crypto::signature::KeyPair
Wrapper struct containing an Ed25519 Key Pair
Methods
impl KeyPair
[src]
pub fn new() -> Result<Self, Box<dyn Error>>
[src]
Generates a new random keypair
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Box<dyn Error>>
[src]
Constructs a keypair from a bytearray containing data in the pkcs8 format
pub fn from_seed_checked(
seed: &[u8; 32],
publickey: &Ed25519PublicKey
) -> Result<Self, Box<dyn Error>>
[src]
seed: &[u8; 32],
publickey: &Ed25519PublicKey
) -> Result<Self, Box<dyn Error>>
Creates a keypair with the provided and seed and checks if the generated key matches the given public key
pub fn public_key(&self) -> Result<Ed25519PublicKey, Box<dyn Error>>
[src]
Returns the Public part of the KeyPair
Auto Trait Implementations
impl Unpin for KeyPair
impl Sync for KeyPair
impl Send for KeyPair
impl RefUnwindSafe for KeyPair
impl UnwindSafe for KeyPair
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,