2022-03-22 16:21:33 +00:00
|
|
|
package ch.fhnw.kry;
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
|
|
|
|
class CTRTest {
|
|
|
|
|
|
|
|
@Test
|
|
|
|
void generateIV() {
|
|
|
|
int count = 0;
|
|
|
|
while(count < Integer.MAX_VALUE) {
|
2022-03-22 18:38:52 +00:00
|
|
|
int iv = CTR.generateIV();
|
2022-03-22 16:21:33 +00:00
|
|
|
assert (iv < 1 << 16);
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|