From cd8edbd5e26829d9b6af7aee1c969eaf4840bee5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 24 May 2015 01:41:32 +0300 Subject: add state-to-block conversion function --- src/common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/common.c b/src/common.c index 92f5e24..f4020db 100644 --- a/src/common.c +++ b/src/common.c @@ -24,6 +24,11 @@ AesState aes_block_to_state(AesBlock block) return state; } +AesBlock aes_state_to_block(AesState state) +{ + return _mm_loadu_si128((__m128i*) &state.bytes); +} + void print_aes_block(AesBlock block) { int i, j; -- cgit v1.2.3