open-keychain/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/IOpenPgpService.aidl

85 lines
2.5 KiB
Plaintext
Raw Normal View History

2013-05-28 09:10:36 -04:00
/*
* Copyright (C) 2014 Dominik Schürmann <dominik@dominikschuermann.de>
2013-05-28 09:10:36 -04:00
*
* 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.
*/
2013-09-10 17:19:34 -04:00
package org.openintents.openpgp;
2013-05-28 09:10:36 -04:00
2013-09-10 17:19:34 -04:00
interface IOpenPgpService {
/**
2014-02-14 07:40:24 -05:00
* General extras
* --------------
*
2014-02-15 09:19:50 -05:00
* Bundle params:
* int api_version (required)
* boolean ascii_armor (request ascii armor for ouput)
*
2014-02-15 09:19:50 -05:00
* returned Bundle:
* int result_code (0, 1, or 2 (see OpenPgpConstants))
* OpenPgpError error (if result_code == 0)
* Intent intent (if result_code == 2)
*
*/
2013-05-28 09:10:36 -04:00
/**
2014-02-15 09:19:50 -05:00
* Sign only
*
* optional params:
* String passphrase (for key passphrase)
2013-05-28 09:10:36 -04:00
*/
2014-02-14 07:40:24 -05:00
Bundle sign(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
2013-05-28 09:10:36 -04:00
/**
2014-02-15 09:19:50 -05:00
* Encrypt
2014-02-14 07:40:24 -05:00
*
2014-02-15 09:19:50 -05:00
* Bundle params:
2014-02-14 07:40:24 -05:00
* long[] key_ids
* or
2014-02-15 09:19:50 -05:00
* 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)
2013-05-28 09:10:36 -04:00
*/
2014-02-14 07:40:24 -05:00
Bundle encrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
2013-05-28 09:10:36 -04:00
/**
2014-02-15 09:19:50 -05:00
* Sign and encrypt
2013-05-28 09:10:36 -04:00
*
2014-02-15 09:19:50 -05:00
* Bundle params:
2014-02-14 07:40:24 -05:00
* same as in encrypt()
2013-05-28 09:10:36 -04:00
*/
2014-02-14 07:40:24 -05:00
Bundle signAndEncrypt(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
2013-05-28 09:10:36 -04:00
/**
2013-10-02 13:08:33 -04:00
* Decrypts and verifies given input bytes. This methods handles encrypted-only, signed-and-encrypted,
* and also signed-only input.
2014-02-15 09:19:50 -05:00
*
* returned Bundle:
* OpenPgpSignatureResult signature_result
2013-05-28 09:10:36 -04:00
*/
2014-02-14 07:40:24 -05:00
Bundle decryptAndVerify(in Bundle params, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
/**
* Retrieves key ids based on given user ids (=emails)
*
2014-02-15 09:19:50 -05:00
* Bundle params:
* String[] user_ids
*
2014-02-15 09:19:50 -05:00
* returned Bundle:
* long[] key_ids
*/
Bundle getKeyIds(in Bundle params);
2013-05-28 09:10:36 -04:00
}