Struct xoodyak::XoodyakKeyed

source ·
pub struct XoodyakKeyed { /* private fields */ }

Implementations§

source§

impl XoodyakKeyed

source

pub fn new( key: &[u8], nonce: Option<&[u8]>, key_id: Option<&[u8]>, counter: Option<&[u8]> ) -> Result<Self, Error>

source

pub fn absorb_key_and_nonce( &mut self, key: &[u8], key_id: Option<&[u8]>, nonce: Option<&[u8]>, counter: Option<&[u8]> ) -> Result<(), Error>

source

pub fn ratchet(&mut self)

source

pub fn encrypt(&mut self, out: &mut [u8], bin: &[u8]) -> Result<(), Error>

source

pub fn decrypt(&mut self, out: &mut [u8], bin: &[u8]) -> Result<(), Error>

source

pub fn encrypt_in_place(&mut self, in_out: &mut [u8])

source

pub fn decrypt_in_place(&mut self, in_out: &mut [u8])

source

pub fn aead_encrypt_detached( &mut self, out: &mut [u8], bin: Option<&[u8]> ) -> Result<Tag, Error>

source

pub fn aead_encrypt( &mut self, out: &mut [u8], bin: Option<&[u8]> ) -> Result<(), Error>

source

pub fn aead_decrypt_detached( &mut self, out: &mut [u8], auth_tag: &Tag, bin: Option<&[u8]> ) -> Result<(), Error>

source

pub fn aead_decrypt(&mut self, out: &mut [u8], bin: &[u8]) -> Result<(), Error>

source

pub fn aead_encrypt_in_place_detached(&mut self, in_out: &mut [u8]) -> Tag

source

pub fn aead_encrypt_in_place(&mut self, in_out: &mut [u8]) -> Result<(), Error>

source

pub fn aead_decrypt_in_place_detached( &mut self, in_out: &mut [u8], auth_tag: &Tag ) -> Result<(), Error>

source

pub fn aead_decrypt_in_place<'t>( &mut self, in_out: &'t mut [u8] ) -> Result<&'t mut [u8], Error>

source

pub fn encrypt_to_vec(&mut self, bin: &[u8]) -> Result<Vec<u8>, Error>

source

pub fn decrypt_to_vec(&mut self, bin: &[u8]) -> Result<Vec<u8>, Error>

source

pub fn aead_encrypt_to_vec_detached( &mut self, bin: Option<&[u8]> ) -> Result<(Vec<u8>, Tag), Error>

source

pub fn aead_encrypt_to_vec( &mut self, bin: Option<&[u8]> ) -> Result<Vec<u8>, Error>

source

pub fn aead_encrypt_in_place_to_vec(&mut self, in_out: Vec<u8>) -> Vec<u8>

source

pub fn aead_decrypt_to_vec_detached( &mut self, auth_tag: Tag, bin: Option<&[u8]> ) -> Result<Vec<u8>, Error>

source

pub fn aead_decrypt_to_vec(&mut self, bin: &[u8]) -> Result<Vec<u8>, Error>

source

pub fn aead_decrypt_in_place_to_vec( &mut self, in_out: Vec<u8> ) -> Result<Vec<u8>, Error>

Trait Implementations§

source§

impl Clone for XoodyakKeyed

source§

fn clone(&self) -> XoodyakKeyed

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for XoodyakKeyed

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl XoodyakCommon for XoodyakKeyed

source§

fn absorb(&mut self, bin: &[u8])

source§

fn absorb_more(&mut self, bin: &[u8], rate: usize)

source§

fn squeeze(&mut self, out: &mut [u8])

source§

fn squeeze_key(&mut self, out: &mut [u8])

source§

fn squeeze_more(&mut self, out: &mut [u8])

source§

fn squeeze_to_vec(&mut self, len: usize) -> Vec<u8>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.