Struct wildland_corex::SigningKeypair
source · pub struct SigningKeypair(_);Implementations§
source§impl SigningKeypair
impl SigningKeypair
pub fn generate<R>(csprng: &mut R) -> SigningKeypairwhere R: CryptoRng + RngCore,
pub fn try_from_bytes_slices( pubkey: [u8; 32], seckey: [u8; 32] ) -> Result<SigningKeypair, CryptoError>
pub fn try_from_str( public_key: &str, secret_key: &str ) -> Result<SigningKeypair, CryptoError>
pub fn try_from_secret_bytes( secret_key_bytes: &[u8; 32] ) -> Result<SigningKeypair, CryptoError>
pub fn public(&self) -> [u8; 32]
pub fn secret(&self) -> [u8; 32]
pub fn to_bytes(&self) -> Vec<u8, Global> ⓘ
pub fn sign(&self, msg: &[u8]) -> Signature
Trait Implementations§
source§impl Debug for SigningKeypair
impl Debug for SigningKeypair
source§impl<'de> Deserialize<'de> for SigningKeypair
impl<'de> Deserialize<'de> for SigningKeypair
source§fn deserialize<D>(
deserializer: D
) -> Result<SigningKeypair, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<SigningKeypair, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&SigningKeypair> for SigningKeypair
impl From<&SigningKeypair> for SigningKeypair
source§fn from(other: &SigningKeypair) -> SigningKeypair
fn from(other: &SigningKeypair) -> SigningKeypair
Converts to this type from the input type.
source§impl PartialEq<SigningKeypair> for SigningKeypair
impl PartialEq<SigningKeypair> for SigningKeypair
source§fn eq(&self, other: &SigningKeypair) -> bool
fn eq(&self, other: &SigningKeypair) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for SigningKeypair
impl Serialize for SigningKeypair
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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
Auto Trait Implementations§
impl RefUnwindSafe for SigningKeypair
impl Send for SigningKeypair
impl Sync for SigningKeypair
impl Unpin for SigningKeypair
impl UnwindSafe for SigningKeypair
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