From 441712cefee39f03a208ae2960ec29cf7361aef6 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Wed, 17 Jul 2024 11:52:45 -0400 Subject: [PATCH] update K for RC4 test; --- tests/crypto/RC4_Crypto_Test.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/crypto/RC4_Crypto_Test.cpp b/tests/crypto/RC4_Crypto_Test.cpp index cd5e6bd4..bcb12775 100644 --- a/tests/crypto/RC4_Crypto_Test.cpp +++ b/tests/crypto/RC4_Crypto_Test.cpp @@ -30,9 +30,10 @@ TEST_CASE("RC4", "[Crypto Test]") { srand((unsigned int)time(NULL)); // key (K) - uint8_t K[8] = + uint8_t K[13] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 + 0x00, 0x01, 0x02, 0x03, 0x04, // Selectable Key + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 // MI }; // message @@ -48,10 +49,10 @@ TEST_CASE("RC4", "[Crypto Test]") { Utils::dump(2U, "RC4_Crypto_Test, Message", message, 48); - uint8_t* crypted = rc4->crypt(message, 48 * sizeof(uint8_t), K, 8); + uint8_t* crypted = rc4->crypt(message, 48 * sizeof(uint8_t), K, 13); Utils::dump(2U, "RC4_Crypto_Test, Encrypted", crypted, 48); - uint8_t* decrypted = rc4->crypt(crypted, 48 * sizeof(uint8_t), K, 8); + uint8_t* decrypted = rc4->crypt(crypted, 48 * sizeof(uint8_t), K, 13); Utils::dump(2U, "RC4_Crypto_Test, Decrypted", decrypted, 48); for (uint32_t i = 0; i < 48U; i++) {