Skip to content

Commit

Permalink
Refactor lib.rs, add chain_enc and chain_dec
Browse files Browse the repository at this point in the history
  • Loading branch information
sayantn committed Dec 8, 2024
1 parent 7a88a18 commit 64181a0
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 425 deletions.
4 changes: 2 additions & 2 deletions src/aes_arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl AesBlock {
}

#[inline(always)]
pub(crate) fn pre_enc_last(self, round_key: Self) -> Self {
fn pre_enc_last(self, round_key: Self) -> Self {
Self(unsafe { vaeseq_u8(self.0, round_key.0) })
}

Expand All @@ -129,7 +129,7 @@ impl AesBlock {
}

#[inline(always)]
pub(crate) fn pre_dec_last(self, round_key: Self) -> Self {
fn pre_dec_last(self, round_key: Self) -> Self {
Self(unsafe { vaesdq_u8(self.0, round_key.0) })
}

Expand Down
4 changes: 2 additions & 2 deletions src/aes_riscv32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl AesBlock {
}

#[inline(always)]
pub(crate) fn pre_enc_last(self, round_key: Self) -> Self {
fn pre_enc_last(self, round_key: Self) -> Self {
outer!(aes32esi, self, round_key)
}

Expand All @@ -156,7 +156,7 @@ impl AesBlock {
}

#[inline(always)]
pub(crate) fn pre_dec_last(self, round_key: Self) -> Self {
fn pre_dec_last(self, round_key: Self) -> Self {
outer!(aes32dsi, self, round_key)
}

Expand Down
Loading

0 comments on commit 64181a0

Please sign in to comment.