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
f832b418
Commit
f832b418
authored
Jun 15, 2016
by
kokke
Committed by
GitHub
Jun 15, 2016
Browse files
s/strncmp/memcmp/g
parent
7e42e693
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.c
View file @
f832b418
...
@@ -92,7 +92,7 @@ static void test_encrypt_ecb(void)
...
@@ -92,7 +92,7 @@ static void test_encrypt_ecb(void)
printf
(
"ECB decrypt: "
);
printf
(
"ECB decrypt: "
);
if
(
0
==
strn
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
16
))
if
(
0
==
mem
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
16
))
{
{
printf
(
"SUCCESS!
\n
"
);
printf
(
"SUCCESS!
\n
"
);
}
}
...
@@ -125,7 +125,7 @@ static void test_decrypt_cbc(void)
...
@@ -125,7 +125,7 @@ static void test_decrypt_cbc(void)
printf
(
"CBC decrypt: "
);
printf
(
"CBC decrypt: "
);
if
(
0
==
strn
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
64
))
if
(
0
==
mem
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
64
))
{
{
printf
(
"SUCCESS!
\n
"
);
printf
(
"SUCCESS!
\n
"
);
}
}
...
@@ -153,7 +153,7 @@ static void test_encrypt_cbc(void)
...
@@ -153,7 +153,7 @@ static void test_encrypt_cbc(void)
printf
(
"CBC encrypt: "
);
printf
(
"CBC encrypt: "
);
if
(
0
==
strn
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
64
))
if
(
0
==
mem
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
64
))
{
{
printf
(
"SUCCESS!
\n
"
);
printf
(
"SUCCESS!
\n
"
);
}
}
...
@@ -175,7 +175,7 @@ static void test_decrypt_ecb(void)
...
@@ -175,7 +175,7 @@ static void test_decrypt_ecb(void)
printf
(
"ECB decrypt: "
);
printf
(
"ECB decrypt: "
);
if
(
0
==
strn
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
16
))
if
(
0
==
mem
cmp
((
char
*
)
out
,
(
char
*
)
buffer
,
16
))
{
{
printf
(
"SUCCESS!
\n
"
);
printf
(
"SUCCESS!
\n
"
);
}
}
...
...
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