From dae5b69966d40ea863c85e6f8a9383b792158c1b Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 23 Nov 2025 18:50:05 +0200 Subject: [PATCH] feat(aes): Add missing transformation methods to Block128 --- aes/src/block/block128.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aes/src/block/block128.rs b/aes/src/block/block128.rs index 3903e9f..3abf48b 100644 --- a/aes/src/block/block128.rs +++ b/aes/src/block/block128.rs @@ -181,12 +181,16 @@ impl Block128 { Self::from_be_bytes(bytes) } + #[inline] + #[must_use] pub fn sub_bytes(self) -> Self { - todo!() + Self(self.0.sbox_lookup()) } + #[inline] + #[must_use] pub fn inv_sub_bytes(self) -> Self { - todo!() + Self(self.0.inv_sbox_lookup()) } }