Skip to content
Prev Previous commit
Next Next commit
Fix clang errors
  • Loading branch information
Hardvan committed Oct 6, 2024
commit 0d2b6bf554065082cc639a07ca65602433ce0007
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ public class A5CipherTest {
@BeforeEach
void setUp() {
// Initialize the session key and frame counter
sessionKey = BitSet.valueOf(new long[]{0b1010101010101010L}); // Example 16-bit key
frameCounter = BitSet.valueOf(new long[]{0b0000000000000001L}); // Example 16-bit frame counter
sessionKey = BitSet.valueOf(new long[] {0b1010101010101010L}); // Example 16-bit key
frameCounter = BitSet.valueOf(new long[] {0b0000000000000001L}); // Example 16-bit frame counter
a5Cipher = new A5Cipher(sessionKey, frameCounter);
}

@Test
void testEncryptWithValidInput() {
BitSet plainText = BitSet.valueOf(new long[]{0b1100110011001100L}); // Example plaintext
BitSet plainText = BitSet.valueOf(new long[] {0b1100110011001100L}); // Example plaintext
BitSet encrypted = a5Cipher.encrypt(plainText);

// The expected result depends on the key stream generated.
Expand All @@ -34,7 +34,7 @@ void testEncryptWithValidInput() {

@Test
void testEncryptAllOnesInput() {
BitSet plainText = BitSet.valueOf(new long[]{0b1111111111111111L}); // All ones
BitSet plainText = BitSet.valueOf(new long[] {0b1111111111111111L}); // All ones
BitSet encrypted = a5Cipher.encrypt(plainText);

// Similar to testEncryptWithValidInput, ensure that output isn't the same as input
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.thealgorithms.ciphers.a5;

public class A5KeyStreamGeneratorTest {
}