pub struct DsaRef<T>(_, _);
Expand description
Reference to Dsa
.
Implementations
sourceimpl<T> DsaRef<T> where
T: HasPublic,
impl<T> DsaRef<T> where
T: HasPublic,
sourcepub fn public_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
pub fn public_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Serialies the public key into a PEM-encoded SubjectPublicKeyInfo structure.
The output will have a header of -----BEGIN PUBLIC KEY-----
.
This corresponds to PEM_write_bio_DSA_PUBKEY
.
sourcepub fn public_key_to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn public_key_to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the public key into a DER-encoded SubjectPublicKeyInfo structure.
This corresponds to i2d_DSA_PUBKEY
.
sourceimpl<T> DsaRef<T> where
T: HasPrivate,
impl<T> DsaRef<T> where
T: HasPrivate,
sourcepub fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
pub fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the private key to a PEM-encoded DSAPrivateKey structure.
The output will have a header of -----BEGIN DSA PRIVATE KEY-----
.
This corresponds to PEM_write_bio_DSAPrivateKey
.
sourcepub fn private_key_to_pem_passphrase(
&self,
cipher: Cipher,
passphrase: &[u8]
) -> Result<Vec<u8>, ErrorStack>
pub fn private_key_to_pem_passphrase(
&self,
cipher: Cipher,
passphrase: &[u8]
) -> Result<Vec<u8>, ErrorStack>
Serializes the private key to a PEM-encoded encrypted DSAPrivateKey structure.
The output will have a header of -----BEGIN DSA PRIVATE KEY-----
.
This corresponds to PEM_write_bio_DSAPrivateKey
.
Trait Implementations
sourceimpl<T> ForeignTypeRef for DsaRef<T>
impl<T> ForeignTypeRef for DsaRef<T>
sourceimpl<T> ToOwned for DsaRef<T>
impl<T> ToOwned for DsaRef<T>
impl<T> Send for DsaRef<T>
impl<T> Sync for DsaRef<T>
Auto Trait Implementations
impl<T> !RefUnwindSafe for DsaRef<T>
impl<T> Unpin for DsaRef<T> where
T: Unpin,
impl<T> UnwindSafe for DsaRef<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more