pub struct Xtea { /* private fields */ }Expand description
An Xtea data structure equipped to perform the eXtended TEA block cipher. Each XTEA instance takes a 128-bit key represented in the form of [XteaKey], applying a pseudorandom permutation on passed-in data in 64-bit chunks, commonly referred to as “blocks”.
Implementations§
Source§impl Xtea
impl Xtea
Sourcepub fn using_key(key: [u32; 4]) -> Self
pub fn using_key(key: [u32; 4]) -> Self
Assigns a 128-bit key using the passed-in array of 32-bit integers.
Sourcepub fn with_rounds(self, rounds: u32) -> Self
pub fn with_rounds(self, rounds: u32) -> Self
Specifies the amount of rounds to be used when processing the block ciphers. This overrides the default amount of rounds used of 32.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Xtea
impl RefUnwindSafe for Xtea
impl Send for Xtea
impl Sync for Xtea
impl Unpin for Xtea
impl UnwindSafe for Xtea
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more