private static IsValidDsaStrength ( int strength ) : bool | ||
strength | int | |
리턴 | bool |
private static bool IsValidDsaStrength(
int strength)
{
return strength >= 512 && strength <= 1024 && strength % 64 == 0;
}
}
public virtual void Init(int size, int certainty, SecureRandom random) { if (!DsaParametersGenerator.IsValidDsaStrength(size)) { throw new ArgumentException("size must be from 512 - 1024 and a multiple of 64", "size"); } this.use186_3 = false; this.L = size; this.N = DsaParametersGenerator.GetDefaultN(size); this.certainty = certainty; this.random = random; }