示例#1
0
 public void setPrvKey(byte[] x, byte[] p, byte[] q, byte[] g)
 {
     DSAKeyInfo.X = StringAux.stripLeadingZeros(x);
     DSAKeyInfo.P = StringAux.stripLeadingZeros(p);
     DSAKeyInfo.Q = StringAux.stripLeadingZeros(q);
     DSAKeyInfo.G = StringAux.stripLeadingZeros(g);
 }
示例#2
0
 public void setPubKey(byte[] y, byte[] p, byte[] q, byte[] g)
 {
     DSAKeyInfo.Y = StringAux.stripLeadingZeros(y);
     DSAKeyInfo.P = StringAux.stripLeadingZeros(p);
     DSAKeyInfo.Q = StringAux.stripLeadingZeros(q);
     DSAKeyInfo.G = StringAux.stripLeadingZeros(g);
 }
示例#3
0
 public void setPrvKey(byte[] e, byte[] n, byte[] d, byte[] p, byte[] q, byte[] dp, byte[] dq, byte[] c)
 {
     RSAKeyInfo.Exponent = e;
     RSAKeyInfo.D        = StringAux.stripLeadingZeros(d);
     RSAKeyInfo.Modulus  = StringAux.stripLeadingZeros(n);
     RSAKeyInfo.P        = StringAux.stripLeadingZeros(p);
     RSAKeyInfo.Q        = StringAux.stripLeadingZeros(q);
     RSAKeyInfo.DP       = StringAux.stripLeadingZeros(dp);
     RSAKeyInfo.DQ       = StringAux.stripLeadingZeros(dq);
     RSAKeyInfo.InverseQ = StringAux.stripLeadingZeros(c);
 }
示例#4
0
 public void setPubKey(byte[] e, byte[] n)
 {
     //    RSAPublicKeySpec rsaPubKeySpec =
     //	new RSAPublicKeySpec(new BigInteger(n),
     //			     new BigInteger(e));
     //    PublicKey pubKey=keyFactory.generatePublic(rsaPubKeySpec);
     //    signature.initVerify(pubKey);
     RSAKeyInfo.Modulus  = StringAux.stripLeadingZeros(n);
     RSAKeyInfo.Exponent = e;
     //			Util.Dump("C:\\e.bin", e);
     //			Util.Dump("C:\\n.bin", n);
 }