pub struct PrivateKey { /* private fields */ }
Expand description
The private half of an elliptic curve key pair.
Implementations§
Source§impl PrivateKey
impl PrivateKey
Sourcepub fn decode_point(ctx: &Context, key: &[u8]) -> Result<PrivateKey, Error>
pub fn decode_point(ctx: &Context, key: &[u8]) -> Result<PrivateKey, Error>
Decode a PrivateKey
from raw key data.
Sourcepub fn generate_public_key(&self) -> Result<PublicKey, Error>
pub fn generate_public_key(&self) -> Result<PublicKey, Error>
Derive the public part of this key pair.
Trait Implementations§
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 · 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 Ord for PrivateKey
impl Ord for PrivateKey
Source§fn cmp(&self, other: &PrivateKey) -> Ordering
fn cmp(&self, other: &PrivateKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PrivateKey
impl PartialEq for PrivateKey
Source§impl PartialOrd for PrivateKey
impl PartialOrd for PrivateKey
Source§impl Serializable for PrivateKey
impl Serializable for PrivateKey
impl Eq 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 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