diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-15 17:09:21 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-15 17:09:21 +0100 |
commit | 2b98f2a0d7e37542a062886437c3f7b14599a4da (patch) | |
tree | 2645589a90490198eff8309030a1b569b53a23f9 /libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl | |
parent | a76169c39e77e85c174707cad0f992b1920e0c0f (diff) | |
download | open-keychain-2b98f2a0d7e37542a062886437c3f7b14599a4da.tar.gz open-keychain-2b98f2a0d7e37542a062886437c3f7b14599a4da.tar.bz2 open-keychain-2b98f2a0d7e37542a062886437c3f7b14599a4da.zip |
Restructure API lib folder to support Eclipse
Diffstat (limited to 'libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl')
-rw-r--r-- | libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl b/libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl new file mode 100644 index 000000000..578a7d4b5 --- /dev/null +++ b/libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2014 Dominik Schürmann <dominik@dominikschuermann.de> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openintents.openpgp; + +interface IOpenPgpService { + + /** + * General extras + * -------------- + * + * Bundle params: + * int api_version (required) + * boolean ascii_armor (request ascii armor for ouput) + * + * returned Bundle: + * int result_code (0, 1, or 2 (see OpenPgpConstants)) + * OpenPgpError error (if result_code == 0) + * Intent intent (if result_code == 2) + * + */ + + /** + * Sign only + * + * optional params: + * String passphrase (for key passphrase) + */ + Bundle sign(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output); + + /** + * Encrypt + * + * Bundle params: + * long[] key_ids + * or + * String[] user_ids (= emails of recipients) (if more than one key has this user_id, a PendingIntent is returned) + * + * optional params: + * String passphrase (for key passphrase) + */ + Bundle encrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output); + + /** + * Sign and encrypt + * + * Bundle params: + * same as in encrypt() + */ + 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. + * + * returned Bundle: + * OpenPgpSignatureResult signature_result + */ + Bundle decryptAndVerify(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output); + + /** + * Retrieves key ids based on given user ids (=emails) + * + * Bundle params: + * String[] user_ids + * + * returned Bundle: + * long[] key_ids + */ + Bundle getKeyIds(in Bundle params); + +}
\ No newline at end of file |