[−][src]Struct openssl::derive::Deriver  
A type used to derive a shared secret between two keys.
Methods
impl<'a> Deriver<'a>[src] 
impl<'a> Deriver<'a>pub fn new<T>(key: &'a PKeyRef<T>) -> Result<Deriver<'a>, ErrorStack> where
    T: HasPrivate, [src] 
pub fn new<T>(key: &'a PKeyRef<T>) -> Result<Deriver<'a>, ErrorStack> where
    T: HasPrivate, Creates a new Deriver using the provided private key.
This corresponds to EVP_PKEY_derive_init.
pub fn set_peer<T>(&mut self, key: &'a PKeyRef<T>) -> Result<(), ErrorStack> where
    T: HasPublic, [src] 
pub fn set_peer<T>(&mut self, key: &'a PKeyRef<T>) -> Result<(), ErrorStack> where
    T: HasPublic, Sets the peer key used for secret derivation.
This corresponds to EVP_PKEY_derive_set_peer:
pub fn len(&mut self) -> Result<usize, ErrorStack>[src] 
pub fn len(&mut self) -> Result<usize, ErrorStack>Returns the size of the shared secret.
It can be used to size the buffer passed to Deriver::derive.
This corresponds to EVP_PKEY_derive.
pub fn derive(&mut self, buf: &mut [u8]) -> Result<usize, ErrorStack>[src] 
pub fn derive(&mut self, buf: &mut [u8]) -> Result<usize, ErrorStack>Derives a shared secret between the two keys, writing it into the buffer.
Returns the number of bytes written.
This corresponds to EVP_PKEY_derive.
pub fn derive_to_vec(&mut self) -> Result<Vec<u8>, ErrorStack>[src] 
pub fn derive_to_vec(&mut self) -> Result<Vec<u8>, ErrorStack>A convenience function which derives a shared secret and returns it in a new buffer.
This simply wraps Deriver::len and Deriver::derive.
Trait Implementations
Blanket Implementations
impl<T> From for T[src] 
impl<T> From for Timpl<T, U> Into for T where
    U: From<T>, [src] 
impl<T, U> Into for T where
    U: From<T>, impl<T, U> TryFrom for T where
    T: From<U>, [src] 
impl<T, U> TryFrom for T where
    T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src] 
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
    T: ?Sized, [src] 
impl<T> Borrow for T where
    T: ?Sized, impl<T> BorrowMut for T where
    T: ?Sized, [src] 
impl<T> BorrowMut for T where
    T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src] 
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
    U: TryFrom<T>, [src] 
impl<T, U> TryInto for T where
    U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src] 
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
    T: 'static + ?Sized, [src] 
impl<T> Any for T where
    T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src] 
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API.  (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more