throw new IllegalArgumentException("key");
throw new IllegalArgumentException("signature");
  public byte[] encodeSignature(Object signature)  {    BigInteger r, s;    try      {        BigInteger[] sig = (BigInteger[]) signature;        r = sig[0];        s = sig[1];      }    catch (Exception x)      {        throw new IllegalArgumentException("key");      }    ByteArrayOutputStream baos = new ByteArrayOutputStream();    // magic    baos.write(Registry.MAGIC_RAW_DSS_SIGNATURE[0]);    baos.write(Registry.MAGIC_RAW_DSS_SIGNATURE[1]);    baos.write(Registry.MAGIC_RAW_DSS_SIGNATURE[2]);    baos.write(Registry.MAGIC_RAW_DSS_SIGNATURE[3]);    // version    baos.write(0x01);    // r    byte[] buffer = r.toByteArray();    int length = buffer.length;    baos.write(length >>> 24);    baos.write((length >>> 16) & 0xFF);    baos.write((length >>> 8) & 0xFF);    baos.write(length & 0xFF);    baos.write(buffer, 0, length);    // s    buffer = s.toByteArray();    length = buffer.length;    baos.write(length >>> 24);    baos.write((length >>> 16) & 0xFF);    baos.write((length >>> 8) & 0xFF);    baos.write(length & 0xFF);    baos.write(buffer, 0, length);    return baos.toByteArray();  }