Struct openssl::ec::EcKeyRef
[−]
pub struct EcKeyRef(_);
Reference to EcKey
Methods
impl EcKeyRef
[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 private_key_to_der(&self) -> Result<Vec<u8>, ErrorStack>
[src]
Serializes the private key to DER.
pub fn group(&self) -> Option<&EcGroupRef>
[src]
Return [EcGroup
] of the EcKey
OpenSSL documentation at EC_KEY_get0_group
pub fn public_key(&self) -> Option<&EcPointRef>
[src]
Return [EcPoint
] associated with the public key
OpenSSL documentation at EC_KEY_get0_pubic_key
pub fn private_key(&self) -> Option<&BigNumRef>
[src]
Return [EcPoint
] associated with the private key
OpenSSL documentation at EC_KEY_get0_private_key
pub fn check_key(&self) -> Result<(), ErrorStack>
[src]
Checks the key for validity.
OpenSSL documenation at EC_KEY_check_key
pub fn to_owned(&self) -> Result<EcKey, ErrorStack>
[src]
Create a copy of the EcKey
to allow modification
Trait Implementations
impl ForeignTypeRef for EcKeyRef
type CType = EC_KEY
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.