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.
Sourcepub fn derive_child(&self, other: [u8; 32]) -> Result<Self>
pub fn derive_child(&self, other: [u8; 32]) -> Result<Self>
Derive child key from parent 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 duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PrivateKey
Source§impl Debug for PrivateKey
impl Debug for PrivateKey
impl Eq 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
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnsafeUnpin 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