if (Configuration.DEBUG)
  public byte[] encodePublicKey(PublicKey key)  {    log.entering(this.getClass().getName(), "encodePublicKey()", key);    if (! (key instanceof GnuRSAPublicKey))      throw new InvalidParameterException("key");    DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, RSA_ALG_OID);    GnuRSAPublicKey rsaKey = (GnuRSAPublicKey) key;    BigInteger n = rsaKey.getN();    BigInteger e = rsaKey.getE();    DERValue derN = new DERValue(DER.INTEGER, n);    DERValue derE = new DERValue(DER.INTEGER, e);    ArrayList algorithmID = new ArrayList(2);    algorithmID.add(derOID);    algorithmID.add(new DERValue(DER.NULL, null));    DERValue derAlgorithmID = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE,                                           algorithmID);    ArrayList publicKey = new ArrayList(2);    publicKey.add(derN);    publicKey.add(derE);    DERValue derPublicKey = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE,                                         publicKey);    byte[] spkBytes = derPublicKey.getEncoded();    DERValue derSPK = new DERValue(DER.BIT_STRING, new BitString(spkBytes));    ArrayList spki = new ArrayList(2);    spki.add(derAlgorithmID);    spki.add(derSPK);    DERValue derSPKI = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE, spki);    byte[] result;    ByteArrayOutputStream baos = new ByteArrayOutputStream();    try      {        DERWriter.write(baos, derSPKI);        result = baos.toByteArray();      }    catch (IOException x)      {        InvalidParameterException y = new InvalidParameterException();        y.initCause(x);        throw y;      }    log.exiting(this.getClass().getName(), "encodePublicKey()", result);    return result;  }