Trait encrust::Encrustable

source ·
pub trait Encrustable {
    // Required method
    unsafe fn toggle_encrust(
        &mut self,
        encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>>
    );
}
Expand description

Trait required to use data types with encrust. If it is avoidable, do not implement this manually, but use the derive macro to generate the implementation.

Required Methods§

source

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

Called when encrypting and decrypting data. Using this function manually may lead to safety issues and should not be called explicitly.

Safety

toggle_encrust directly modifies the underlying data in arbitrary ways, possibly making it unsafe to use. This function should only ever be called by encrust to scramble objects or unscramble them for reading.

Implementations on Foreign Types§

source§

impl Encrustable for u64

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for i16

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for String

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for i128

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for u128

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for u16

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl<T> Encrustable for Vec<T, Global>where T: Encrustable,

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for u8

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl<T, const N: usize> Encrustable for [T; N]where T: Encrustable,

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for usize

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for i8

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for isize

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for u32

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for i32

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

source§

impl Encrustable for i64

source§

unsafe fn toggle_encrust( &mut self, encruster: &mut StreamCipherCoreWrapper<XChaChaCore<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>> )

Implementors§