pub struct DhPublicKey { /* private fields */ }Expand description
Public key for DH.
Implementations§
Source§impl DhPublicKey
impl DhPublicKey
pub fn modulus(&self) -> &BigUint
pub fn subgroup_order(&self) -> &BigUint
pub fn generator(&self) -> &BigUint
Sourcepub fn public_component(&self) -> &BigUint
pub fn public_component(&self) -> &BigUint
The public component y = g^x mod p.
pub fn params(&self) -> DhParams
Sourcepub fn to_key_blob(&self) -> Vec<u8> ⓘ
pub fn to_key_blob(&self) -> Vec<u8> ⓘ
Encode in binary format: [p, q, g, y].
Sourcepub fn from_key_blob(blob: &[u8]) -> Option<Self>
pub fn from_key_blob(blob: &[u8]) -> Option<Self>
Decode from binary format.
pub fn to_pem(&self) -> String
Sourcepub fn from_pem(pem: &str) -> Option<Self>
pub fn from_pem(pem: &str) -> Option<Self>
Returns None if the PEM label does not match or the payload is malformed.
pub fn to_xml(&self) -> String
Trait Implementations§
Source§impl Clone for DhPublicKey
impl Clone for DhPublicKey
Source§fn clone(&self) -> DhPublicKey
fn clone(&self) -> DhPublicKey
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 moreSource§impl Debug for DhPublicKey
impl Debug for DhPublicKey
Source§impl PartialEq for DhPublicKey
impl PartialEq for DhPublicKey
Source§fn eq(&self, other: &DhPublicKey) -> bool
fn eq(&self, other: &DhPublicKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DhPublicKey
impl StructuralPartialEq for DhPublicKey
Auto Trait Implementations§
impl Freeze for DhPublicKey
impl RefUnwindSafe for DhPublicKey
impl Send for DhPublicKey
impl Sync for DhPublicKey
impl Unpin for DhPublicKey
impl UnsafeUnpin for DhPublicKey
impl UnwindSafe for DhPublicKey
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