1commit 6bec5eedde31bacbafcb541a728719eeff99d3b7
2Author: Dominik Schürmann <dominik@dominikschuermann.de>
3Date: Mon Aug 11 17:19:23 2014 +0200
4
5 Increase version to 4
6
7diff --git a/src/org/openintents/openpgp/util/OpenPgpApi.java b/src/org/openintents/openpgp/util/OpenPgpApi.java
8index 029584423..238447502 100644
9--- a/src/org/openintents/openpgp/util/OpenPgpApi.java
10+++ b/src/org/openintents/openpgp/util/OpenPgpApi.java
11@@ -34,9 +34,22 @@ public class OpenPgpApi {
12
13 public static final String TAG = "OpenPgp API";
14
15- public static final int API_VERSION = 3;
16 public static final String SERVICE_INTENT = "org.openintents.openpgp.IOpenPgpService";
17
18+ /**
19+ * Version history
20+ * ---------------
21+ * <p/>
22+ * 3:
23+ * - first public stable version
24+ * <p/>
25+ * 4:
26+ * - No changes to existing methods -> backward compatible
27+ * - Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, and OpenPgpDecryptMetadata parcel
28+ * - Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
29+ */
30+ public static final int API_VERSION = 4;
31+
32 /**
33 * General extras
34 * --------------
35@@ -54,7 +67,7 @@ public class OpenPgpApi {
36 * Sign only
37 * <p/>
38 * optional extras:
39- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
40+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
41 * String EXTRA_PASSPHRASE (key passphrase)
42 */
43 public static final String ACTION_SIGN = "org.openintents.openpgp.action.SIGN";
44@@ -68,7 +81,7 @@ public class OpenPgpApi {
45 * long[] EXTRA_KEY_IDS
46 * <p/>
47 * optional extras:
48- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
49+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
50 * String EXTRA_PASSPHRASE (key passphrase)
51 */
52 public static final String ACTION_ENCRYPT = "org.openintents.openpgp.action.ENCRYPT";
53@@ -82,7 +95,7 @@ public class OpenPgpApi {
54 * long[] EXTRA_KEY_IDS
55 * <p/>
56 * optional extras:
57- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
58+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
59 * String EXTRA_PASSPHRASE (key passphrase)
60 */
61 public static final String ACTION_SIGN_AND_ENCRYPT = "org.openintents.openpgp.action.SIGN_AND_ENCRYPT";
62@@ -95,13 +108,24 @@ public class OpenPgpApi {
63 * in addition a PendingIntent is returned via RESULT_INTENT to download missing keys.
64 * <p/>
65 * optional extras:
66- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
67+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
68 * <p/>
69 * returned extras:
70 * OpenPgpSignatureResult RESULT_SIGNATURE
71+ * OpenPgpDecryptMetadata RESULT_METADATA
72 */
73 public static final String ACTION_DECRYPT_VERIFY = "org.openintents.openpgp.action.DECRYPT_VERIFY";
74
75+ /**
76+ * Decrypts the header of an encrypted file to retrieve metadata such as original filename.
77+ * <p/>
78+ * This does not decrypt the actual content of the file.
79+ * <p/>
80+ * returned extras:
81+ * OpenPgpDecryptMetadata RESULT_METADATA
82+ */
83+ public static final String ACTION_DECRYPT_METADATA = "org.openintents.openpgp.action.DECRYPT_METADATA";
84+
85 /**
86 * Get key ids based on given user ids (=emails)
87 * <p/>
88@@ -165,6 +189,7 @@ public class OpenPgpApi {
89
90 // DECRYPT_VERIFY
91 public static final String RESULT_SIGNATURE = "signature";
92+ public static final String RESULT_METADATA = "metadata";
93
94 IOpenPgpService mService;
95 Context mContext;