int len = 512;
while (len <= 1024) {
if (len == modlen) {
lengthModulus = modlen;
break;
} else {
len = len + 8;
if (len == 1032) {
throw new InvalidParameterException("Incorrect modlen");
}
}
}
if (modlen < 512 || modlen > 1024) {
throw new InvalidParameterException("Incorrect modlen");
}
if (random == null) {
throw new InvalidParameterException("Incorrect random");
}
if (genParams == false && dsaParams == null) {
throw new InvalidParameterException("there are not precomputed parameters");
}
secureRandom = random;