kry-ctr-spn/src/test/java/ch/fhnw/kry/CTRTest.java
Sebastian Hugentobler e1c2d7df7d
Fix CTR decryption.
Off by one error in respect to the y blocks.
2022-03-22 21:07:04 +01:00

17 lines
289 B
Java

package ch.fhnw.kry;
import org.junit.jupiter.api.Test;
class CTRTest {
@Test
void generateIV() {
int count = 0;
while (count < Integer.MAX_VALUE) {
int iv = CTR.generateIV();
assert (iv < 1 << 16);
count++;
}
}
}