pub struct Dh<T>(/* private fields */);
Implementations§
source§impl Dh<Params>
impl Dh<Params>
pub fn from_params( p: BigNum, g: BigNum, q: BigNum ) -> Result<Dh<Params>, ErrorStack>
sourcepub fn params_from_pem(pem: &[u8]) -> Result<Dh<Params>, ErrorStack>
pub fn params_from_pem(pem: &[u8]) -> Result<Dh<Params>, ErrorStack>
Deserializes a PEM-encoded PKCS#3 DHpararameters structure.
The input should have a header of -----BEGIN DH PARAMETERS-----
.
This corresponds to PEM_read_bio_DHparams
.
sourcepub fn params_from_der(der: &[u8]) -> Result<Dh<Params>, ErrorStack>
pub fn params_from_der(der: &[u8]) -> Result<Dh<Params>, ErrorStack>
Deserializes a DER-encoded PKCS#3 DHparameters structure.
This corresponds to d2i_DHparams
.
Methods from Deref<Target = DhRef<T>>§
sourcepub fn params_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
pub fn params_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the parameters into a PEM-encoded PKCS#3 DHparameter structure.
The output will have a header of -----BEGIN DH PARAMETERS-----
.
This corresponds to PEM_write_bio_DHparams
.
sourcepub fn params_to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn params_to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the parameters into a DER-encoded PKCS#3 DHparameter structure.
This corresponds to i2d_DHparams
.
Trait Implementations§
source§impl<T> ForeignType for Dh<T>
impl<T> ForeignType for Dh<T>
impl<T> Send for Dh<T>
impl<T> Sync for Dh<T>
Auto Trait Implementations§
impl<T> Freeze for Dh<T>
impl<T> RefUnwindSafe for Dh<T>where
T: RefUnwindSafe,
impl<T> Unpin for Dh<T>where
T: Unpin,
impl<T> UnwindSafe for Dh<T>where
T: UnwindSafe,
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