Struct wildland_corex::SigningKeypair
source · [−]pub struct SigningKeypair(_);Implementations
sourceimpl 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
sourceimpl Debug for SigningKeypair
impl Debug for SigningKeypair
sourceimpl<'de> Deserialize<'de> for SigningKeypair
impl<'de> Deserialize<'de> for SigningKeypair
sourcefn 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
sourceimpl From<&SigningKeypair> for SigningKeypair
impl From<&SigningKeypair> for SigningKeypair
sourcefn from(other: &SigningKeypair) -> SigningKeypair
fn from(other: &SigningKeypair) -> SigningKeypair
Converts to this type from the input type.
sourceimpl PartialEq<SigningKeypair> for SigningKeypair
impl PartialEq<SigningKeypair> for SigningKeypair
sourcefn eq(&self, other: &SigningKeypair) -> bool
fn eq(&self, other: &SigningKeypair) -> bool
sourceimpl Serialize for SigningKeypair
impl Serialize for SigningKeypair
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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