Commit Graph

27 Commits

Author SHA1 Message Date
Markus Doits
ad16574657 Allow to pass large blobs and a new content provider to simplify this
Since AIDL is not for passing large data, a blob can be passed to APG by
a Uri. This Uri is opened as a file by APG and read/written to. Note the
file is overwritten by APG, so make sure it is a copy if you want to
keep the original.

With the ApgServiceBlobProvider, Apg has an own ContentProvider that can
be used like mentioned above. For now the data is stored in the dir
where APG stores other files and NOT DELETED after en/decryption. This
is tbd. It can only be accessed by an application with the permission
"org.thialfihar.android.apg.permission.STORE_BLOBS".

ApgCon has been updated accordingly and can handle blobs with `setBlob`
and `getBlobResult`. That is a really easy way to en/decrypt large data.

Note that encrypting by blob should only be used for large files (1MB+).
On all other cases, the data should be passed as as String through the
AIDl-Interface, so no temporary file must be created.

See ApgCon for a complete example of how to connect to the AIDL and use
it. Or use it in your own project!
2011-11-04 21:22:49 +01:00
Markus Doits
24205b8dbc Cleanup of code, AIDL-calls renamed! 2011-06-05 19:05:57 +00:00
Markus Doits
6502e58c26 Possibility to not compile Log.d and Log.v in 2011-06-05 19:05:18 +00:00
Markus Doits
cb4f1933d5 Dont remove result and warnings from result
Some more debug output, too
2011-01-23 21:36:51 +00:00
Markus Doits
1ec5fc0541 Allow to retrieve fingerprints and user ids through AIDL
Update ApgCon and doc accordingly.

Not very tested.
2011-01-23 21:36:35 +00:00
Markus Doits
6b7db8161a Don't query things we don't need 2011-01-23 21:36:27 +00:00
Markus Doits
b5097b7a41 Some more verbose logs 2011-01-20 20:23:13 +00:00
Markus Doits
c9f6f56827 Work on errors and documentation - once more 2011-01-20 20:00:28 +00:00
Markus Doits
392969629c Some better (non-misleading) error msgs
Also some reindentation
2011-01-20 18:38:15 +00:00
Markus Doits
1af5a985b5 Redefine some log-msges 2011-01-20 18:25:38 +00:00
Markus Doits
05627fbd62 Print some info about keys on asymmetric encryption 2011-01-20 18:19:42 +00:00
Markus Doits
79cf07f1e2 Compare strings like they should be compared 2011-01-18 22:24:28 +00:00
Markus Doits
3f703fa4ea More finegrained errors 2011-01-18 21:17:05 +00:00
Markus Doits
79238cbcce Rename parameters
Writing them out should make them clearer
2011-01-18 20:35:41 +00:00
Markus Doits
5eaea519ad Refactor some log prios 2011-01-18 20:35:33 +00:00
Markus Doits
eb75eea64f Allow get_master_key to accept null string
Return earlier on wrong length, too.
2011-01-17 22:21:41 +00:00
Markus Doits
f9ee141ce1 Allow to sign and specify passphrase on decrypting 2011-01-17 22:16:49 +00:00
Markus Doits
a1c75dd47c Add asymmetric encryption 2011-01-13 20:12:10 +00:00
Markus Doits
8b35229650 Actually check for unknown args for function 2011-01-11 22:31:35 +00:00
Markus Doits
45e4897dc7 Redefine many internals of ApgService
This helps to add new function calls easily. Some of the new enums
could be exported to other files to be included by other projects later
on.

Next step is asymmetric encryption.
2011-01-11 22:24:20 +00:00
Markus Doits
d367bc12f8 Make some things static
*Should* speed up encryption, or better: does not make encryption using
AIDL slower than using APG directly.
2011-01-11 17:58:13 +00:00
Markus Doits
c84c449035 Respect options but allow to overwrite them for each call
By default the values set in APG's options are respected now. But they
can be overwritten by special parameters passed through.
2011-01-09 19:16:45 +00:00
Markus Doits
9e089f03b6 Prefix local vars with "_" 2011-01-09 19:16:22 +00:00
Markus Doits
1a338de47e 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).
2011-01-05 14:07:09 +00:00
Markus Doits
6477f60764 Add connection helper for other projects
This eases using the AIDL-Interface and is the recommended way for other
project to implement the connection.
2011-01-04 23:08:08 +00:00
Markus Doits
2660c561a1 Reload preferences on call
refs r326
2010-12-30 13:48:24 +00:00
Markus Doits
e8d29c01c2 Add first basic implementation of Apgservice
Provides an AIDL-API for other apps to encrypt and decrypt a string
symmetrically with a passphrase. Function names and API is by no way
finalized and will change!

Support for asymetric encription will follow.

For reference and discussion see issue #71,
https://code.google.com/p/android-privacy-guard/issues/detail?id=71
2010-12-29 16:31:58 +00:00