Struct openssl::dsa::DsaRef
[−]
pub struct DsaRef(_);
Reference to Dsa
.
Methods
impl DsaRef
[src]
pub fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
[src]
Serializes the private key to PEM.
pub fn private_key_to_pem_passphrase(
&self,
cipher: Cipher,
passphrase: &[u8]
) -> Result<Vec<u8>, ErrorStack>
[src]
&self,
cipher: Cipher,
passphrase: &[u8]
) -> Result<Vec<u8>, ErrorStack>
Serializes the private key to PEM, encrypting it with the specified symmetric cipher and passphrase.
pub fn public_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
[src]
Serializes a public key to PEM.
pub fn private_key_to_der(&self) -> Result<Vec<u8>, ErrorStack>
[src]
Serializes the private key to DER.
pub fn public_key_to_der(&self) -> Result<Vec<u8>, ErrorStack>
[src]
Serializes the public key to DER.
pub fn size(&self) -> Option<u32>
[src]
Returns the maximum size of the signature output by self
in bytes. Returns
None if the keys are uninitialized.
OpenSSL documentation at DSA_size
pub fn p(&self) -> Option<&BigNumRef>
[src]
Returns the DSA prime parameter of self
.
pub fn q(&self) -> Option<&BigNumRef>
[src]
Returns the DSA sub-prime parameter of self
.
pub fn g(&self) -> Option<&BigNumRef>
[src]
Returns the DSA base parameter of self
.
pub fn has_public_key(&self) -> bool
[src]
Returns whether the DSA includes a public key, used to confirm the authenticity of the message.
pub fn has_private_key(&self) -> bool
[src]
Returns whether the DSA includes a private key, used to prove the authenticity of a message.
Trait Implementations
impl ForeignTypeRef for DsaRef
type CType = DSA
The raw C type.
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
[src]
Constructs a shared instance of this type from its raw type.
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
[src]
Constructs a mutable reference of this type from its raw type.
fn as_ptr(&self) -> *mut Self::CType
[src]
Returns a raw pointer to the wrapped value.