Struct laron_crypto::PrivateKey
source · pub struct PrivateKey { /* private fields */ }Expand description
Private Key
Implementations§
source§impl PrivateKey
impl PrivateKey
sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Create a new PrivateKey from bytes
sourcepub fn from_slice(slice: &[u8]) -> Result<Self>
pub fn from_slice(slice: &[u8]) -> Result<Self>
Create a new PrivateKey from slice
sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Generate public key.
Trait Implementations§
source§impl Aes for PrivateKey
impl Aes for PrivateKey
source§impl Clone for PrivateKey
impl Clone for PrivateKey
source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PrivateKey
impl Debug for PrivateKey
source§impl From<&PrivateKey> for Aes256Gcm
impl From<&PrivateKey> for Aes256Gcm
source§fn from(value: &PrivateKey) -> Self
fn from(value: &PrivateKey) -> Self
Converts to this type from the input type.
source§impl From<&PrivateKey> for SigningKey
impl From<&PrivateKey> for SigningKey
source§fn from(value: &PrivateKey) -> Self
fn from(value: &PrivateKey) -> Self
Converts to this type from the input type.
source§impl From<SigningKey<Secp256k1>> for PrivateKey
impl From<SigningKey<Secp256k1>> for PrivateKey
source§fn from(value: SigningKey) -> Self
fn from(value: SigningKey) -> Self
Converts to this type from the input type.
source§impl K256Recover for PrivateKey
impl K256Recover for PrivateKey
source§impl K256Sign for PrivateKey
impl K256Sign for PrivateKey
source§impl PartialEq<PrivateKey> for PrivateKey
impl PartialEq<PrivateKey> for PrivateKey
source§fn eq(&self, other: &PrivateKey) -> bool
fn eq(&self, other: &PrivateKey) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for PrivateKey
impl Eq for PrivateKey
impl StructuralEq for PrivateKey
impl StructuralPartialEq for PrivateKey
Auto Trait Implementations§
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
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