public void testNullData() throws Exception {
    SigningPublicKey publicKey = new SigningPublicKey();
    publicKey.toString();

    boolean error = false;
    try {
      publicKey.writeBytes(new ByteArrayOutputStream());
    } catch (DataFormatException dfe) {
      error = true;
    }
    assertTrue(error);
  }
  public void testShortData() throws Exception {
    SigningPublicKey publicKey = new SigningPublicKey();
    byte data[] = new byte[56];
    for (int i = 0; i < data.length; i++) data[i] = (byte) (i);

    boolean error = false;
    try {
      publicKey.setData(data);
      publicKey.writeBytes(new ByteArrayOutputStream());
    } catch (DataFormatException dfe) {
      error = true;
    } catch (IllegalArgumentException exc) {
      error = true;
    }

    assertTrue(error);
  }