aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-01 22:33:49 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-01 22:33:49 +0200
commit37c8e157d0030c478ea00fbc407c8365b400af1a (patch)
tree89c3344aac980a087632d97089037d0ee15af9f2 /src/eu/siacs/conversations/entities
parent4b66b4b5d1c6376c964d1f252b813ba21b80a64d (diff)
reworked openpgp integration part #1
Diffstat (limited to 'src/eu/siacs/conversations/entities')
-rw-r--r--src/eu/siacs/conversations/entities/Account.java12
-rw-r--r--src/eu/siacs/conversations/entities/Message.java1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Account.java b/src/eu/siacs/conversations/entities/Account.java
index 41132b1f..35870aaa 100644
--- a/src/eu/siacs/conversations/entities/Account.java
+++ b/src/eu/siacs/conversations/entities/Account.java
@@ -275,4 +275,16 @@ public class Account extends AbstractEntity{
public int countPresences() {
return this.presences.size();
}
+
+ public String getPgpSignature() {
+ if (keys.has("pgp_signature")) {
+ try {
+ return keys.getString("pgp_signature");
+ } catch (JSONException e) {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
}
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java
index 6acc5939..49ae0265 100644
--- a/src/eu/siacs/conversations/entities/Message.java
+++ b/src/eu/siacs/conversations/entities/Message.java
@@ -24,6 +24,7 @@ public class Message extends AbstractEntity {
public static final int ENCRYPTION_PGP = 1;
public static final int ENCRYPTION_OTR = 2;
public static final int ENCRYPTION_DECRYPTED = 3;
+ public static final int ENCRYPTION_DECRYPTION_FAILED = 4;
public static final int TYPE_TEXT = 0;
public static final int TYPE_IMAGE = 1;