diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eu/siacs/conversations/crypto/PgpEngine.java | 6 |
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()); |