From 8ce19bc97b2975341b133f6d80027d597fa078dd Mon Sep 17 00:00:00 2001 From: Sadoon Albader Date: Tue, 3 Oct 2023 21:18:42 +0300 Subject: [PATCH] fix huge bug with C poly1305 function call --- crypto/poly1305/poly1305-rand-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/poly1305/poly1305-rand-test.c b/crypto/poly1305/poly1305-rand-test.c index ad527062..7a056c30 100644 --- a/crypto/poly1305/poly1305-rand-test.c +++ b/crypto/poly1305/poly1305-rand-test.c @@ -24,7 +24,7 @@ int main(int argc, char **argv){ for (int i = 0; i < msg_size; i++) msg[i] = random() & 0x000000FF; - poly1305_auth(mac, msg, sizeof(msg), key); + poly1305_auth(mac, msg, msg_size, key); for (int i = 0; i < msg_size; i++) printf("%u%s", msg[i], (i == msg_size-1) ? "\n" : "," ); -- 2.30.2