157158159160161162163164165166167
AlgorithmParameters params; try { params = AlgorithmParameters.getInstance("ElGamal", "BC"); params.init(new ElGamalParameterSpec(p.getP(), p.getG())); } catch (Exception e) { throw new RuntimeException(e.getMessage()); }
51525354555657
JCEElGamalPrivateKey( DHPrivateKey key) { this.x = key.getX(); this.elSpec = new ElGamalParameterSpec(key.getParams().getP(), key.getParams().getG()); }
58596061626364
JCEElGamalPrivateKey( ElGamalPrivateKeySpec spec) { this.x = spec.getX(); this.elSpec = new ElGamalParameterSpec(spec.getParams().getP(), spec.getParams().getG()); }
65666768697071
JCEElGamalPrivateKey( DHPrivateKeySpec spec) { this.x = spec.getX(); this.elSpec = new ElGamalParameterSpec(spec.getP(), spec.getG()); }
76777879808182
{ ElGamalParameter params = new ElGamalParameter((ASN1Sequence)info.getAlgorithmId().getParameters()); DERInteger derX = ASN1Integer.getInstance(info.parsePrivateKey()); this.x = derX.getValue(); this.elSpec = new ElGamalParameterSpec(params.getP(), params.getG()); }
83848586878889
JCEElGamalPrivateKey( ElGamalPrivateKeyParameters params) { this.x = params.getX(); this.elSpec = new ElGamalParameterSpec(params.getParameters().getP(), params.getParameters().getG()); }
133134135136137138139
ObjectInputStream in) throws IOException, ClassNotFoundException { x = (BigInteger)in.readObject(); this.elSpec = new ElGamalParameterSpec((BigInteger)in.readObject(), (BigInteger)in.readObject()); }
31323334353637
JCEElGamalPublicKey( ElGamalPublicKeySpec spec) { this.y = spec.getY(); this.elSpec = new ElGamalParameterSpec(spec.getParams().getP(), spec.getParams().getG()); }
38394041424344
JCEElGamalPublicKey( DHPublicKeySpec spec) { this.y = spec.getY(); this.elSpec = new ElGamalParameterSpec(spec.getP(), spec.getG()); }
52535455565758
JCEElGamalPublicKey( DHPublicKey key) { this.y = key.getY(); this.elSpec = new ElGamalParameterSpec(key.getParams().getP(), key.getParams().getG()); }