mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-21 22:09:23 +01:00
unit: test-arc4: test RC4 both directions
Tests that the data both encrypts and decrypts.
This commit is contained in:
parent
1f9d9e1eb1
commit
98b684b417
@ -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(arc4_skip(test->key, 16, test->offset, buf, sizeof(buf), buf));
|
||||||
assert(!memcmp(buf, test->result, sizeof(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[])
|
int main(int argc, char *argv[])
|
||||||
|
Loading…
Reference in New Issue
Block a user