Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Tiny AES C
Commits
ca85e00d
Unverified
Commit
ca85e00d
authored
Feb 22, 2019
by
kokke
Committed by
GitHub
Feb 22, 2019
Browse files
Update aes.c
cosmetic: fixing whitespace / indentation
parent
4b4b04b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
aes.c
View file @
ca85e00d
...
...
@@ -466,7 +466,7 @@ static void InvCipher(state_t* state, const uint8_t* RoundKey)
#if defined(ECB) && (ECB == 1)
void
AES_ECB_encrypt
(
const
struct
AES_ctx
*
ctx
,
uint8_t
*
buf
)
void
AES_ECB_encrypt
(
const
struct
AES_ctx
*
ctx
,
uint8_t
*
buf
)
{
// The next function call encrypts the PlainText with the Key using AES algorithm.
Cipher
((
state_t
*
)
buf
,
ctx
->
RoundKey
);
...
...
@@ -552,9 +552,9 @@ void AES_CTR_xcrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, uint32_t length)
/* Increment Iv and handle overflow */
for
(
bi
=
(
AES_BLOCKLEN
-
1
);
bi
>=
0
;
--
bi
)
{
/* inc will overflow */
/* inc will overflow */
if
(
ctx
->
Iv
[
bi
]
==
255
)
{
{
ctx
->
Iv
[
bi
]
=
0
;
continue
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment