aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/crypto/PgpEngine.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-06 19:59:56 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-06 19:59:56 +0100
commite319dd2cee7dc2597d4e9fcb8b52fe75b96c7b39 (patch)
treec062bf30056d567c6b2f799f725e0c6e57acc22c /src/eu/siacs/conversations/crypto/PgpEngine.java
parent4edd623a1e71d7d2c7a3e0bd4cad7cabeb9a0268 (diff)
api bug fix
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/crypto/PgpEngine.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java
index 78384441..bc3aaa8c 100644
--- a/src/eu/siacs/conversations/crypto/PgpEngine.java
+++ b/src/eu/siacs/conversations/crypto/PgpEngine.java
@@ -10,6 +10,7 @@ import org.openintents.openpgp.util.OpenPgpApi;
import android.app.PendingIntent;
import android.content.Intent;
+import android.util.Log;
public class PgpEngine {
private OpenPgpApi api;
@@ -39,7 +40,8 @@ public class PgpEngine {
}
public String encrypt(long keyId, String message) {
- Long[] keys = {keyId};
+ Log.d("xmppService","encrypt message: "+message+" for key "+keyId);
+ long[] keys = {keyId};
Intent params = new Intent();
params.setAction(OpenPgpApi.ACTION_ENCRYPT);
params.putExtra(OpenPgpApi.EXTRA_KEY_IDS,keys);
@@ -49,6 +51,8 @@ public class PgpEngine {
ByteArrayOutputStream os = new ByteArrayOutputStream();
Intent result = api.executeApi(params, is, os);
StringBuilder encryptedMessageBody = new StringBuilder();
+ Log.d("xmppService","intent: "+result.toString());
+ Log.d("xmppService","output: "+os.toString());
String[] lines = os.toString().split("\n");
for (int i = 3; i < lines.length - 1; ++i) {
encryptedMessageBody.append(lines[i].trim());