make checkGenerator param final

This commit is contained in:
jacekpoz 2024-05-10 22:09:45 +02:00
parent 1b6be03572
commit c8b89f4e0b
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -34,7 +34,7 @@ public class DHSetup<T extends IGF> implements IDHSetup<T> {
} }
private boolean checkGenerator(T a) { private boolean checkGenerator(final T a) {
long p = a.getCharacteristic() - 1; long p = a.getCharacteristic() - 1;
for (long q : sieve_of_eratosthenes((long)Math.sqrt(p))) { for (long q : sieve_of_eratosthenes((long)Math.sqrt(p))) {
T b = this.constructor.apply(new GF.Params(a.getCharacteristic(), p / q)); T b = this.constructor.apply(new GF.Params(a.getCharacteristic(), p / q));