From c0f1acf85c48cdfb2489d32384985ad6be8d8847 Mon Sep 17 00:00:00 2001 From: Lanyaaki Date: Tue, 25 Oct 2016 13:22:08 +0800 Subject: [PATCH] fix test program function parameter error --- crypto/sms4/sms4test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/sms4/sms4test.c b/crypto/sms4/sms4test.c index 1734266b..9325fa30 100644 --- a/crypto/sms4/sms4test.c +++ b/crypto/sms4/sms4test.c @@ -50,7 +50,7 @@ int main(int argc, char **argv) printf("sms4 key scheduling passed!\n"); /* test encrypt once */ - sms4_encrypt(&key, plaintext, buf); + sms4_encrypt(plaintext, buf, &key); if (memcmp(buf, ciphertext1, sizeof(ciphertext1)) != 0) { printf("sms4 encrypt not pass!\n"); @@ -61,7 +61,7 @@ int main(int argc, char **argv) /* test encrypt 1000000 times */ memcpy(buf, plaintext, sizeof(plaintext)); for (i = 0; i < 1000000; i++) { - sms4_encrypt(&key, buf, buf); + sms4_encrypt(buf, buf, &key); } if (memcmp(buf, ciphertext2, sizeof(ciphertext2)) != 0) {