// Using a SimpleASNWriter
ByteArrayOutputStream r = new ByteArrayOutputStream();
ByteArrayOutputStream s = new ByteArrayOutputStream();
SimpleASNWriter asn = new SimpleASNWriter();
asn.writeByte(0x02);
if (((signature[0] & 0x80) == 0x80) && (signature[0] != 0x00)) {
r.write(0);
r.write(signature, 0, 20);
} else {