diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-30 21:36:28 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-30 21:36:28 +0200 |
commit | b42636ec3ec63bef61af264a0a9b09998db8186b (patch) | |
tree | 0917522a666d3584f87692fc11b527df5d6f6bd6 /openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java | |
parent | b5c0b1bd7b7822d344d33b91af761d24e681ddd2 (diff) | |
download | openpgp-api-b42636ec3ec63bef61af264a0a9b09998db8186b.tar.gz openpgp-api-b42636ec3ec63bef61af264a0a9b09998db8186b.tar.bz2 openpgp-api-b42636ec3ec63bef61af264a0a9b09998db8186b.zip |
New OpenPgpDecryptionResult, introduce UNSIGNED, UNENCRYPTED results instead of return types, rework constant naming in OpenPgpSignatureResult
Diffstat (limited to 'openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java')
-rw-r--r-- | openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpApi.java | 23 |
1 files changed, 12 insertions, 11 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 25bf72b..39e71ce 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 @@ -49,7 +49,7 @@ public class OpenPgpApi { * - Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel * - Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP * 5: - * - OpenPgpSignatureResult: new consts SIGNATURE_KEY_REVOKED and SIGNATURE_KEY_EXPIRED + * - OpenPgpSignatureResult: new consts RESULT_INVALID_KEY_REVOKED and RESULT_INVALID_KEY_EXPIRED * - OpenPgpSignatureResult: ArrayList<String> userIds * 6: * - Deprecate ACTION_SIGN @@ -66,8 +66,14 @@ public class OpenPgpApi { * - New ACTION_GET_SIGN_KEY_ID * - 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 + * - OpenPgpSignatureResult: + * method getStatus() renamed to getResult() + * constants have been renamed for clarity + * new constants: RESULT_NO_SIGNATURE, RESULT_INVALID_INSECURE + * isSignatureOnly() has been deprecated + * - RESULT_TYPES have been removed + * - new OpenPgpDecryptionResult returned via RESULT_DECRYPTION + * - OpenPgpSignatureResult and OpenPgpDecryptionResult are never null, they are always returned. */ public static final int API_VERSION = 8; @@ -164,7 +170,7 @@ public class OpenPgpApi { * and also signed-only input. * OutputStream is optional, e.g., for verifying detached signatures! * <p/> - * If OpenPgpSignatureResult.getStatus() == OpenPgpSignatureResult.SIGNATURE_KEY_MISSING + * If OpenPgpSignatureResult.getResult() == OpenPgpSignatureResult.RESULT_KEY_MISSING * in addition a PendingIntent is returned via RESULT_INTENT to download missing keys. * On all other status, in addition a PendingIntent is returned via RESULT_INTENT to open * the key view in OpenKeychain. @@ -174,9 +180,9 @@ public class OpenPgpApi { * <p/> * returned extras: * OpenPgpSignatureResult RESULT_SIGNATURE + * OpenPgpDecryptionResult RESULT_DECRYPTION * OpenPgpDecryptMetadata RESULT_METADATA * String RESULT_CHARSET (charset which was specified in the headers of ascii armored input, if any) - * int RESULT_TYPE */ public static final String ACTION_DECRYPT_VERIFY = "org.openintents.openpgp.action.DECRYPT_VERIFY"; @@ -273,16 +279,11 @@ public class OpenPgpApi { // DECRYPT_VERIFY public static final String EXTRA_DETACHED_SIGNATURE = "detached_signature"; public static final String RESULT_SIGNATURE = "signature"; + public static final String RESULT_DECRYPTION = "decryption"; public static final String RESULT_METADATA = "metadata"; // 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_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"; public static final String EXTRA_CALL_UUID2 = "call_uuid2"; |