mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-23 04:20:16 +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:
@ -2438,16 +2438,16 @@ public class AES {
|
||||
public static BigInteger[] keyExpansion(BigInteger initialKey) {
|
||||
BigInteger[] roundKeys = {
|
||||
initialKey,
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
new BigInteger("0"),
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
BigInteger.ZERO,
|
||||
};
|
||||
|
||||
// initialize rcon iteration
|
||||
|
@ -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