Skip to content

Commit 8312ed1

Browse files
committed
encrypt isn't the good verb here, since it's used for both
Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent 644a4c5 commit 8312ed1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ciphers/sm4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ LTC_INLINE static void R(sm4_u32_t Y[4], sm4_u32_t X[32+4])
192192
}
193193

194194
/*
195-
* defined in section 7.1 Encryption
195+
* defined in section 7.1 (En)cryption
196196
*/
197-
LTC_INLINE static void encrypt(sm4_u32_t Y[4], sm4_u32_t X[4+32], const sm4_u32_t rk[32])
197+
LTC_INLINE static void sm4_crypt(sm4_u32_t Y[4], sm4_u32_t X[4+32], const sm4_u32_t rk[32])
198198
{
199199
int i;
200200

@@ -239,7 +239,7 @@ LTC_INLINE static void sm4_do(void *output, const void *input, const sm4_u32_t r
239239
LOAD32H(X[2], (sm4_u8_t *)input + 8);
240240
LOAD32H(X[3], (sm4_u8_t *)input + 12);
241241

242-
encrypt(Y, X, rk);
242+
sm4_crypt(Y, X, rk);
243243

244244
STORE32H(Y[0], (sm4_u8_t *)output );
245245
STORE32H(Y[1], (sm4_u8_t *)output + 4);

0 commit comments

Comments
 (0)