diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-15 21:32:42 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-06-15 21:32:42 +0300 |
commit | 3f5df3abf1386ce9071046bb00e5eae27a10e2ef (patch) | |
tree | c37bdb612d3c0e0175d5092c9d6be8a7b90335f5 /test/aes128ecb_encrypt_block.c | |
parent | code style (diff) | |
download | aes-tools-3f5df3abf1386ce9071046bb00e5eae27a10e2ef.tar.gz aes-tools-3f5df3abf1386ce9071046bb00e5eae27a10e2ef.zip |
handle block parsing errors the standard way
Diffstat (limited to '')
-rw-r--r-- | test/aes128ecb_encrypt_block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/aes128ecb_encrypt_block.c b/test/aes128ecb_encrypt_block.c index c071c6c..502cc65 100644 --- a/test/aes128ecb_encrypt_block.c +++ b/test/aes128ecb_encrypt_block.c @@ -28,7 +28,7 @@ int main(int argc, char** argv) if (argc < 1) exit_with_usage(); - if (aesni_parse_block128(&key, *argv) != 0) + if (aesni_is_error(aesni_parse_block128(&key, *argv, NULL))) { fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv); exit_with_usage(); @@ -41,7 +41,7 @@ int main(int argc, char** argv) if (strcmp("--", *argv) == 0) break; - if (aesni_parse_block128(&plain, *argv) != 0) + if (aesni_is_error(aesni_parse_block128(&plain, *argv, NULL))) { fprintf(stderr, "Invalid 128-bit AES block '%s'\n", *argv); continue; |