for(int i=0;i<=f;i++) { BigInteger ib=BigInteger.valueOf((long)i); //BigInteger r= g1.Power(i); //System.out.println("g^ib =" +r); BigInteger s= g1.modPow(ib,p1); //System.out.println("r:" +r); //System.out.println("a" +a1); //System.out.println("p" +p1); //System.out.println("s:" +s); //System.out.println("a1:" +a1); //BigInteger a1 = BigInteger.valueOf((long)a); if(s.equals(a1)) { System.out.println("The value of m is : \t" +i); } break; } //else // System.out.print("the value did not match \n"); }
a1
BigInteger
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)