From 98b684b417b2c19696c5d84333c25e14b0244788 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 26 Oct 2022 11:56:55 -0700 Subject: [PATCH] unit: test-arc4: test RC4 both directions Tests that the data both encrypts and decrypts. --- unit/test-arc4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unit/test-arc4.c b/unit/test-arc4.c index bfc5009c..a9e0ef1d 100644 --- a/unit/test-arc4.c +++ b/unit/test-arc4.c @@ -92,6 +92,8 @@ static void arc4_skip_test(const void *data) assert(arc4_skip(test->key, 16, test->offset, buf, sizeof(buf), buf)); assert(!memcmp(buf, test->result, sizeof(buf))); + assert(arc4_skip(test->key, 16, test->offset, buf, sizeof(buf), buf)); + assert(l_memeqzero(buf, 16)); } int main(int argc, char *argv[])