Redesign AIDL-Interface once more
Using Bundles makes passing data easier and does not need to redefine the interface if the internel functions change. The helper class has been updated accordingly. In addition, it wrappes completely around all input and output (if wanted).
This commit is contained in:
@@ -1,6 +1,35 @@
|
||||
package org.thialfihar.android.apg;
|
||||
|
||||
interface IApgService {
|
||||
String encrypt_with_passphrase(in List<String> params);
|
||||
String decrypt_with_passphrase(in List<String> params);
|
||||
|
||||
/** All functions fill the return_vals Bundle with the following keys:
|
||||
*
|
||||
* ArrayList<String> "WARNINGS" = Warnings, if any
|
||||
* ArrayList<String> "ERRORS" = Human readable error descriptions, why function call failed
|
||||
* int "ERROR" = Numeric representation of error
|
||||
*/
|
||||
|
||||
/** Encrypt something with a symmetric key
|
||||
*
|
||||
* Bundle params:
|
||||
* (optional/required) TYPE "STRING KEY" = EXPLANATION
|
||||
*
|
||||
* (required) String "MSG" = Message to encrypt
|
||||
* (required) String "SYM_KEY" = Symmetric key to use
|
||||
*
|
||||
* Bundle return_vals (in addition to the ERRORS/WARNINGS above):
|
||||
* String "RESULT" = Encrypted MSG
|
||||
*/
|
||||
boolean encrypt_with_passphrase(in Bundle params, out Bundle return_vals);
|
||||
|
||||
/** Decrypt something with a symmetric key
|
||||
*
|
||||
* Bundle params:
|
||||
* (required) String "MSG" = Message to decrypt
|
||||
* (required) String "SYM_KEY" = Symmetric key to use
|
||||
*
|
||||
* Bundle return_vals:
|
||||
* String "RESULT" = Decrypted MSG
|
||||
*/
|
||||
boolean decrypt_with_passphrase(in Bundle params, out Bundle return_vals);
|
||||
}
|
||||
Reference in New Issue
Block a user