[−][src]Function eva_crypto::generic::transpose
pub fn transpose(input: &u8x4x4) -> u8x4x4
Transpose a 4x4 state matrix, used in many blcok ciphers.
use eva_crypto::generic::transpose; assert_eq!( transpose(&[ [0x1, 0x2, 0x3, 0x4], [0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0], [0x0, 0x0, 0x0, 0x0], ]), [ [0x1, 0x0, 0x0, 0x0], [0x2, 0x0, 0x0, 0x0], [0x3, 0x0, 0x0, 0x0], [0x4, 0x0, 0x0, 0x0], ] );