aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-08-11 17:19:23 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2014-08-11 17:19:23 +0200
commit6bec5eedde31bacbafcb541a728719eeff99d3b7 (patch)
treea6504d06da7707dd6d5db73300729468bb46f821
parent4f6475f11bb8b268775b6633d9f23e3a269aff96 (diff)
Increase version to 4
-rw-r--r--src/org/openintents/openpgp/util/OpenPgpApi.java35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/org/openintents/openpgp/util/OpenPgpApi.java b/src/org/openintents/openpgp/util/OpenPgpApi.java
index 02958442..23844750 100644
--- a/src/org/openintents/openpgp/util/OpenPgpApi.java
+++ b/src/org/openintents/openpgp/util/OpenPgpApi.java
@@ -34,10 +34,23 @@ public class OpenPgpApi {
public static final String TAG = "OpenPgp API";
- public static final int API_VERSION = 3;
public static final String SERVICE_INTENT = "org.openintents.openpgp.IOpenPgpService";
/**
+ * Version history
+ * ---------------
+ * <p/>
+ * 3:
+ * - first public stable version
+ * <p/>
+ * 4:
+ * - No changes to existing methods -> backward compatible
+ * - Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, and OpenPgpDecryptMetadata parcel
+ * - Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
+ */
+ public static final int API_VERSION = 4;
+
+ /**
* General extras
* --------------
*
@@ -54,7 +67,7 @@ public class OpenPgpApi {
* Sign only
* <p/>
* optional extras:
- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
* String EXTRA_PASSPHRASE (key passphrase)
*/
public static final String ACTION_SIGN = "org.openintents.openpgp.action.SIGN";
@@ -68,7 +81,7 @@ public class OpenPgpApi {
* long[] EXTRA_KEY_IDS
* <p/>
* optional extras:
- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
* String EXTRA_PASSPHRASE (key passphrase)
*/
public static final String ACTION_ENCRYPT = "org.openintents.openpgp.action.ENCRYPT";
@@ -82,7 +95,7 @@ public class OpenPgpApi {
* long[] EXTRA_KEY_IDS
* <p/>
* optional extras:
- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
* String EXTRA_PASSPHRASE (key passphrase)
*/
public static final String ACTION_SIGN_AND_ENCRYPT = "org.openintents.openpgp.action.SIGN_AND_ENCRYPT";
@@ -95,14 +108,25 @@ public class OpenPgpApi {
* in addition a PendingIntent is returned via RESULT_INTENT to download missing keys.
* <p/>
* optional extras:
- * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for ouput)
+ * boolean EXTRA_REQUEST_ASCII_ARMOR (request ascii armor for output)
* <p/>
* returned extras:
* OpenPgpSignatureResult RESULT_SIGNATURE
+ * OpenPgpDecryptMetadata RESULT_METADATA
*/
public static final String ACTION_DECRYPT_VERIFY = "org.openintents.openpgp.action.DECRYPT_VERIFY";
/**
+ * Decrypts the header of an encrypted file to retrieve metadata such as original filename.
+ * <p/>
+ * This does not decrypt the actual content of the file.
+ * <p/>
+ * returned extras:
+ * OpenPgpDecryptMetadata RESULT_METADATA
+ */
+ public static final String ACTION_DECRYPT_METADATA = "org.openintents.openpgp.action.DECRYPT_METADATA";
+
+ /**
* Get key ids based on given user ids (=emails)
* <p/>
* required extras:
@@ -165,6 +189,7 @@ public class OpenPgpApi {
// DECRYPT_VERIFY
public static final String RESULT_SIGNATURE = "signature";
+ public static final String RESULT_METADATA = "metadata";
IOpenPgpService mService;
Context mContext;