aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-07-27 21:10:37 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-07-27 21:10:37 +0200
commitb5c0b1bd7b7822d344d33b91af761d24e681ddd2 (patch)
tree51d0325bae725edc6a738ce46b1b5d54154bc3cc
parent1cc39524997a4f1be8bd0238ae819fda23353cbe (diff)
downloadopenpgp-api-b5c0b1bd7b7822d344d33b91af761d24e681ddd2.tar.gz
openpgp-api-b5c0b1bd7b7822d344d33b91af761d24e681ddd2.tar.bz2
openpgp-api-b5c0b1bd7b7822d344d33b91af761d24e681ddd2.zip
Change result types
-rw-r--r--openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java b/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java
index bd40dbe..25bf72b 100644
--- a/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java
+++ b/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java
@@ -67,6 +67,7 @@ public class OpenPgpApi {
* - EXTRA_PASSPHRASE changed from String to char[]
* 8:
* - OpenPgpSignatureResult: new const INSECURE_CRYPTOGRAPHY
+ * - RESULT_TYPES important change: Introduce RESULT_TYPE_SIGNED_AND_ENCRYPTED, remove RESULT_TYPE_UNENCRYPTED_UNSIGNED
*/
public static final int API_VERSION = 8;
@@ -276,10 +277,11 @@ public class OpenPgpApi {
// This will be the charset which was specified in the headers of ascii armored input, if any
public static final String RESULT_CHARSET = "charset";
+ // unencrypted _and_ unsigned content will return an ERROR as there is no OpenPGP data available
public static final String RESULT_TYPE = "type";
- public static final int RESULT_TYPE_UNENCRYPTED_UNSIGNED = 0;
public static final int RESULT_TYPE_ENCRYPTED = 1;
public static final int RESULT_TYPE_SIGNED = 2;
+ public static final int RESULT_TYPE_SIGNED_AND_ENCRYPTED = 3;
// INTERNAL, should not be used
public static final String EXTRA_CALL_UUID1 = "call_uuid1";
@@ -336,11 +338,6 @@ public class OpenPgpApi {
/**
* InputStream and OutputStreams are always closed after operating on them!
- *
- * @param data
- * @param is
- * @param os
- * @return
*/
public Intent executeApi(Intent data, InputStream is, OutputStream os) {
ParcelFileDescriptor input = null;