Skip to content

Commit 4f8b123

Browse files
committed
Refactor lib.rs, add chain_enc and chain_dec
1 parent 7a88a18 commit 4f8b123

File tree

3 files changed

+193
-424
lines changed

3 files changed

+193
-424
lines changed

src/aes_arm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl AesBlock {
113113
}
114114

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

@@ -129,7 +129,7 @@ impl AesBlock {
129129
}
130130

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

src/aes_riscv32.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl AesBlock {
134134
}
135135

136136
#[inline(always)]
137-
pub(crate) fn pre_enc_last(self, round_key: Self) -> Self {
137+
fn pre_enc_last(self, round_key: Self) -> Self {
138138
outer!(aes32esi, self, round_key)
139139
}
140140

@@ -156,7 +156,7 @@ impl AesBlock {
156156
}
157157

158158
#[inline(always)]
159-
pub(crate) fn pre_dec_last(self, round_key: Self) -> Self {
159+
fn pre_dec_last(self, round_key: Self) -> Self {
160160
outer!(aes32dsi, self, round_key)
161161
}
162162

0 commit comments

Comments
 (0)