[−][src]Struct openpgp_dr::Ratchet
A fully-initialized Double Ratchet.
Implementations
impl<D: DH, R: KdfRK, C: KdfCK> Ratchet<D, R, C>
[src]
pub fn new(pre_key: PreKeyPair<D>, header: Header<D>) -> Result<(Self, Key)>
[src]
Initializes the Double Ratchet and derives a message key for decryption.
pub fn encrypt(&mut self) -> Result<(Header<D>, Key)>
[src]
Derives a message key for encryption.
pub fn decrypt(&mut self, header: Header<D>) -> Result<Key>
[src]
Derives a message key for decryption.
Auto Trait Implementations
impl<D, R, C> RefUnwindSafe for Ratchet<D, R, C> where
C: RefUnwindSafe,
R: RefUnwindSafe,
<D as DH>::Public: RefUnwindSafe,
<D as DH>::Secret: RefUnwindSafe,
C: RefUnwindSafe,
R: RefUnwindSafe,
<D as DH>::Public: RefUnwindSafe,
<D as DH>::Secret: RefUnwindSafe,
impl<D, R, C> Send for Ratchet<D, R, C> where
C: Send,
R: Send,
<D as DH>::Public: Send,
<D as DH>::Secret: Send,
C: Send,
R: Send,
<D as DH>::Public: Send,
<D as DH>::Secret: Send,
impl<D, R, C> Sync for Ratchet<D, R, C> where
C: Sync,
R: Sync,
<D as DH>::Public: Sync,
<D as DH>::Secret: Sync,
C: Sync,
R: Sync,
<D as DH>::Public: Sync,
<D as DH>::Secret: Sync,
impl<D, R, C> Unpin for Ratchet<D, R, C> where
C: Unpin,
R: Unpin,
<D as DH>::Public: Unpin,
<D as DH>::Secret: Unpin,
C: Unpin,
R: Unpin,
<D as DH>::Public: Unpin,
<D as DH>::Secret: Unpin,
impl<D, R, C> UnwindSafe for Ratchet<D, R, C> where
C: UnwindSafe,
R: UnwindSafe,
<D as DH>::Public: UnwindSafe,
<D as DH>::Secret: UnwindSafe,
C: UnwindSafe,
R: UnwindSafe,
<D as DH>::Public: UnwindSafe,
<D as DH>::Secret: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,