code: public byte[] getEncodedPKCS1() {
          try {
              if (externalDigest != null)
                  digest = externalDigest;
              else
                  digest = sig.sign();
              ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
              
              ASN1OutputStream dout = new ASN1OutputStream(bOut);
              dout.writeObject(new DEROctetString(digest));
              dout.close();
              
              return bOut.toByteArray();
          }
          catch (Exception e) {
              throw new ExceptionConverter(e);
          }
      }
docs: Gets the bytes for the PKCS#1 object.
  @return a byte array