aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl')
-rw-r--r--libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl151
1 files changed, 29 insertions, 122 deletions
diff --git a/libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl b/libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl
index ef390a7f6..714ca040e 100644
--- a/libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl
+++ b/libraries/keychain-api-library/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl
@@ -23,145 +23,52 @@ import org.openintents.openpgp.IOpenPgpKeyIdsCallback;
interface IOpenPgpService {
/**
- * Bundle params:
- * api_version 1,2,3,... (current: 1)
- * ascii_armor true/false (for output)
- * key_ids long[] (for encrypt method)
+ * General extras
+ * --------------
+ *
+ * params:
+ * int api_version (current: 1)
+ * boolean ascii_armor true/false (for output)
*
*
* Bundle return:
- * result_code RESULT_ERROR=0 (see error), RESULT_OK=1, RESULT_USER_INTERACTION_REQUIRED=2 (execute intent and do it again with params from intent)
- * signature_result OpenPgpSignatureResult
- * error OpenPgpError
- * intent Intent
+ * int result_code 0,1, or 2 (see OpenPgpConstants)
+ * OpenPgpSignatureResult signature_result
+ * OpenPgpError error
+ * Intent intent
*
*/
- Bundle sign(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
-
- Bundle encrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
-
- Bundle signAndEncrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
-
- Bundle decryptAndVerify(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
-
-
-/*
- ------------------OLD--------------------------
-*/
/**
- * Sign
- *
- * After successful signing, callback's onSuccess will contain the resulting output.
+ * sign only
*
- * @param input
- * OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
- * @param output
- * Request output format by defining OpenPgpData object
- *
- * new OpenPgpData(OpenPgpData.TYPE_STRING)
- * Returns as String
- * (OpenPGP Radix-64, 33 percent overhead compared to binary, see http://tools.ietf.org/html/rfc4880#page-53)
- * new OpenPgpData(OpenPgpData.TYPE_BYTE_ARRAY)
- * Returns as byte[]
- * new OpenPgpData(uri)
- * Writes output to given Uri
- * new OpenPgpData(fileDescriptor)
- * Writes output to given ParcelFileDescriptor
- * @param callback
- * Callback where to return results
+ * params:
+ * String passphrase (optional)
*/
- //oneway void sign(in OpenPgpData input, in OpenPgpData output, in IOpenPgpCallback callback);
-
+ Bundle sign(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
/**
- * Encrypt
- *
- * After successful encryption, callback's onSuccess will contain the resulting output.
- *
- * @param input
- * OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
- * @param output
- * Request output format by defining OpenPgpData object
- *
- * new OpenPgpData(OpenPgpData.TYPE_STRING)
- * Returns as String
- * (OpenPGP Radix-64, 33 percent overhead compared to binary, see http://tools.ietf.org/html/rfc4880#page-53)
- * new OpenPgpData(OpenPgpData.TYPE_BYTE_ARRAY)
- * Returns as byte[]
- * new OpenPgpData(uri)
- * Writes output to given Uri
- * new OpenPgpData(fileDescriptor)
- * Writes output to given ParcelFileDescriptor
- * @param keyIds
- * Key Ids of recipients. Can be retrieved with getKeyIds()
- * @param callback
- * Callback where to return results
+ * encrypt
+ *
+ * params:
+ * long[] key_ids
+ * or
+ * String[] user_ids (= emails of recipients) (if more than one key has this user_id, an Intent is returned)
*/
- //oneway void encrypt(in OpenPgpData input, in OpenPgpData output, in long[] keyIds, in IOpenPgpCallback callback);
-
+ Bundle encrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
+
/**
- * Sign then encrypt
- *
- * After successful signing and encryption, callback's onSuccess will contain the resulting output.
+ * sign and encrypt
*
- * @param input
- * OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
- * @param output
- * Request output format by defining OpenPgpData object
- *
- * new OpenPgpData(OpenPgpData.TYPE_STRING)
- * Returns as String
- * (OpenPGP Radix-64, 33 percent overhead compared to binary, see http://tools.ietf.org/html/rfc4880#page-53)
- * new OpenPgpData(OpenPgpData.TYPE_BYTE_ARRAY)
- * Returns as byte[]
- * new OpenPgpData(uri)
- * Writes output to given Uri
- * new OpenPgpData(fileDescriptor)
- * Writes output to given ParcelFileDescriptor
- * @param keyIds
- * Key Ids of recipients. Can be retrieved with getKeyIds()
- * @param callback
- * Callback where to return results
+ * params:
+ * same as in encrypt()
*/
- //oneway void signAndEncrypt(in OpenPgpData input, in OpenPgpData output, in long[] keyIds, in IOpenPgpCallback callback);
-
+ Bundle signAndEncrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
+
/**
* Decrypts and verifies given input bytes. This methods handles encrypted-only, signed-and-encrypted,
* and also signed-only input.
- *
- * After successful decryption/verification, callback's onSuccess will contain the resulting output.
- * The signatureResult in onSuccess is only non-null if signed-and-encrypted or signed-only inputBytes were given.
- *
- * @param input
- * OpenPgpData object containing String, byte[], ParcelFileDescriptor, or Uri
- * @param output
- * Request output format by defining OpenPgpData object
- *
- * new OpenPgpData(OpenPgpData.TYPE_STRING)
- * Returns as String
- * (OpenPGP Radix-64, 33 percent overhead compared to binary, see http://tools.ietf.org/html/rfc4880#page-53)
- * new OpenPgpData(OpenPgpData.TYPE_BYTE_ARRAY)
- * Returns as byte[]
- * new OpenPgpData(uri)
- * Writes output to given Uri
- * new OpenPgpData(fileDescriptor)
- * Writes output to given ParcelFileDescriptor
- * @param callback
- * Callback where to return results
*/
- //oneway void decryptAndVerify(in OpenPgpData input, in OpenPgpData output, in IOpenPgpCallback callback);
-
- /**
- * Get available key ids based on given user ids
- *
- * @param ids
- * User Ids (emails) of recipients OR key ids
- * @param allowUserInteraction
- * Enable user interaction to lookup and import unknown keys
- * @param callback
- * Callback where to return results (different type than callback in other functions!)
- */
- //oneway void getKeyIds(in String[] ids, in boolean allowUserInteraction, in IOpenPgpKeyIdsCallback callback);
-
+ Bundle decryptAndVerify(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
+
} \ No newline at end of file