Browse Source

Fix Testing.java - Build again

JNI-76
Hussein Kasem 7 years ago
parent
commit
3187279c34
  1. 12
      test/Testing.java

12
test/Testing.java

@ -42,35 +42,39 @@ class Testing {
msg.setShortmsg("hello, world"); msg.setShortmsg("hello, world");
msg.setLongmsg("this is a test"); msg.setLongmsg("this is a test");
msg.setDir(Message.Direction.Outgoing);
Message enc = null; Message enc = null;
try { try {
enc = e.encrypt_message(msg, null); enc = e.encrypt_message(msg, null, Message.EncFormat.PEP);
System.out.println("encrypted"); System.out.println("encrypted");
} }
catch (pEpException ex) { catch (pEpException ex) {
System.out.println("cannot encrypt"); System.out.println("cannot encrypt");
ex.printStackTrace();
} }
System.out.println(enc.getLongmsg()); System.out.println(enc.getLongmsg());
Vector<Blob> attachments = enc.getAttachments(); Vector<Blob> attachments = enc.getAttachments();
System.out.println(e.toUTF16(attachments.get(1).data)); System.out.println(e.toUTF16(attachments.get(1).data));
msg.setDir(Message.Direction.Outgoing); msg.setDir(Message.Direction.Outgoing);
try { try {
System.out.println(e.outgoing_message_color(msg)); System.out.println(e.outgoing_message_rating(msg));
} }
catch (pEpException ex) { catch (pEpException ex) {
System.out.println("cannot measure outgoing message color"); System.out.println("cannot measure outgoing message rating");
} }
Engine.decrypt_message_Return result = null; Engine.decrypt_message_Return result = null;
try { try {
result = e.decrypt_message(enc); result = e.decrypt_message(enc, new Vector<>(), 0);
System.out.println("decrypted"); System.out.println("decrypted");
} }
catch (pEpException ex) { catch (pEpException ex) {
System.out.println("cannot decrypt"); System.out.println("cannot decrypt");
ex.printStackTrace();
} }
System.out.println(result.dst.getShortmsg()); System.out.println(result.dst.getShortmsg());

Loading…
Cancel
Save