예제 #1
0
  public byte[] getEncoded() {
    SubjectPublicKeyInfo info =
        new SubjectPublicKeyInfo(
            new AlgorithmIdentifier(
                OIWObjectIdentifiers.elGamalAlgorithm,
                new ElGamalParameter(elSpec.getP(), elSpec.getG()).getDERObject()),
            new DERInteger(y));

    return info.getDEREncoded();
  }
예제 #2
0
 public DHParameterSpec getParams() {
   return new DHParameterSpec(elSpec.getP(), elSpec.getG());
 }
예제 #3
0
 private void writeObject(ObjectOutputStream out) throws IOException {
   out.writeObject(this.getY());
   out.writeObject(elSpec.getP());
   out.writeObject(elSpec.getG());
 }