mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-26 14:04:17 +08:00
Constructors BigInteger and BigDecimal used to wrap primitives should never be used. (#3627)
Constructors BigInteger and BigDecimal used to wrap primitives should never be used. Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
This commit is contained in:
@ -63,7 +63,7 @@ public class RSA {
|
||||
publicKey = BigInteger.valueOf(3L);
|
||||
|
||||
while (m.gcd(publicKey).intValue() > 1) {
|
||||
publicKey = publicKey.add(BigInteger.valueOf(2L));
|
||||
publicKey = publicKey.add(BigInteger.TWO);
|
||||
}
|
||||
|
||||
privateKey = publicKey.modInverse(m);
|
||||
|
Reference in New Issue
Block a user