[][src]Type Definition eva_crypto::generic::u8x4

type u8x4 = [u8; 4];

Trait Implementations

impl Ops for u8x4[src]

fn lrot(&self) -> Self[src]

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

fn rrot(&self) -> Self[src]

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

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

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

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

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

impl Permutation for u8x4[src]