Skip to main content

u8x4

Type Alias u8x4 

Source
pub type u8x4 = [u8; 4];

Trait Implementations§

Source§

impl Ops for u8x4

Source§

fn lrot(&self) -> Self

use eva_crypto::generic::Ops;
assert_eq!(
    [1, 2, 3, 4].lrot(),
    [2, 3, 4, 1]
);
Source§

fn rrot(&self) -> Self

use eva_crypto::generic::Ops;
assert_eq!(
    [1, 2, 3, 4].lrot().rrot(),
    [1, 2, 3, 4]
);
Source§

fn xor(&self, rhs: &Self) -> Self

use eva_crypto::generic::Ops;
assert_eq!(
    [0x0, 0x1, 0x2, 0x3].xor(&[0x3, 0x2, 0x1, 0x0]),
    [0x3, 0x3, 0x3, 0x3]
);
Source§

fn and(&self, rhs: &Self) -> Self

use eva_crypto::generic::Ops;
assert_eq!(
    [0x0, 0x1, 0x1, 0x0].and(&[0x1, 0x3, 0x3, 0x1]),
    [0x0, 0x1, 0x1, 0x0]
);
Source§

fn gmul(&self, rhs: &Self, bits: u8) -> Self

Source§

impl Permutation for u8x4

Source§

fn sub_sbox(&self, sbox: &[u8]) -> Self