I use this code to access a certificate in Android's keystore:
which works fine. Accessing the PublicKey I get "(AndroidKeyStoreRSAPublicKey) android.security.keystore.AndroidKeyStoreRSAPublicKey@9bf04cbe".
How do I get the real value?
B4X:
Dim keystore As JavaObject
keystore = keystore.InitializeStatic("java.security.KeyStore").RunMethod("getInstance", Array("AndroidKeyStore"))
keystore.RunMethod("load", Array(Null))
Dim entry As JavaObject = keystore.RunMethod("getEntry", Array(alias, Null))
Dim PrivateKey As JavaObject = entry.RunMethod("getPrivateKey", Null)
Dim PublicKey As JavaObject = keystore.RunMethodJO("getCertificate", Array(alias)).RunMethod("getPublicKey", Null)
which works fine. Accessing the PublicKey I get "(AndroidKeyStoreRSAPublicKey) android.security.keystore.AndroidKeyStoreRSAPublicKey@9bf04cbe".
How do I get the real value?