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
00f1f921
Commit
00f1f921
authored
Jul 07, 2017
by
Matteo Brichese
Browse files
removed unecessary blockcopy
parent
265d6bce
Changes
1
Show whitespace changes
Inline
Side-by-side
aes.c
View file @
00f1f921
...
...
@@ -506,8 +506,8 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
uintptr_t
i
;
uint8_t
extra
=
length
%
BLOCKLEN
;
/* Remaining bytes in the last non-full block */
memcpy
(
output
,
input
,
BLOCKLEN
);
state
=
(
state_t
*
)
output
;
//
memcpy(output, input, BLOCKLEN);
//
state = (state_t*)output;
// Skip the key expansion if key is passed as 0
if
(
0
!=
key
)
...
...
@@ -546,8 +546,8 @@ void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
uintptr_t
i
;
uint8_t
extra
=
length
%
BLOCKLEN
;
/* Remaining bytes in the last non-full block */
memcpy
(
output
,
input
,
BLOCKLEN
);
state
=
(
state_t
*
)
output
;
//
memcpy(output, input, BLOCKLEN);
//
state = (state_t*)output;
// Skip the key expansion if key is passed as 0
if
(
0
!=
key
)
...
...
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