File tree 2 files changed +8
-4
lines changed
src/test/java/com/thealgorithms/ciphers/a5 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ public class A5CipherTest {
16
16
@ BeforeEach
17
17
void setUp () {
18
18
// Initialize the session key and frame counter
19
- sessionKey = BitSet .valueOf (new long []{0b1010101010101010L}); // Example 16-bit key
20
- frameCounter = BitSet .valueOf (new long []{0b0000000000000001L}); // Example 16-bit frame counter
19
+ sessionKey = BitSet .valueOf (new long [] {0b1010101010101010L}); // Example 16-bit key
20
+ frameCounter = BitSet .valueOf (new long [] {0b0000000000000001L}); // Example 16-bit frame counter
21
21
a5Cipher = new A5Cipher (sessionKey , frameCounter );
22
22
}
23
23
24
24
@ Test
25
25
void testEncryptWithValidInput () {
26
- BitSet plainText = BitSet .valueOf (new long []{0b1100110011001100L}); // Example plaintext
26
+ BitSet plainText = BitSet .valueOf (new long [] {0b1100110011001100L}); // Example plaintext
27
27
BitSet encrypted = a5Cipher .encrypt (plainText );
28
28
29
29
// The expected result depends on the key stream generated.
@@ -34,7 +34,7 @@ void testEncryptWithValidInput() {
34
34
35
35
@ Test
36
36
void testEncryptAllOnesInput () {
37
- BitSet plainText = BitSet .valueOf (new long []{0b1111111111111111L}); // All ones
37
+ BitSet plainText = BitSet .valueOf (new long [] {0b1111111111111111L}); // All ones
38
38
BitSet encrypted = a5Cipher .encrypt (plainText );
39
39
40
40
// Similar to testEncryptWithValidInput, ensure that output isn't the same as input
Original file line number Diff line number Diff line change
1
+ package com .thealgorithms .ciphers .a5 ;
2
+
3
+ public class A5KeyStreamGeneratorTest {
4
+ }
You can’t perform that action at this time.
0 commit comments