Marc (34) [Avatar] Offline
#1
Hi,
My goal is to:
1. GET a PKCS12 file from my server.
2. Save the public cert and private key to the Android keystore.
3. Digitally sign 'documents' (JSON messages).
4. PUT the signed message to my server.

I have found classes like java.security.Signature (https://developer.android.com/reference/java/security/Signature.html)
I have seen how to bind a .jar file, creating Managed Callable Wrappers.
I have found android.jar inside the Android SDK folder.

I am missing the conceptual 'glue' to put those pieces together.
Do I need to extract the .class files I need from android.jar, build my own much smaller jar, and bind it?
Should I expect java.security.Signature to already be on the phone? If so, how do I build bindings to it?
If I 'roll my own' (which just seems wrong to me), how do I deal with different API levels on different phones?

Thank you,
Marc

Jim Bennett (86) [Avatar] Offline
#2
That should already be there - https://developer.xamarin.com/api/namespace/Java.Security/
The whole java API is wrapped and available inside Android apps!