java-security

Crash casting AndroidKeyStoreRSAPrivateKey to RSAPrivateKey

匆匆过客 提交于 2019-11-27 18:29:10
I'm following this tutorial: How to use the Android Keystore to store passwords and other sensitive information . It (loosely) ties up with the Google Sample app: BasicAndroidKeyStore . I can encrypt my data using the public key, and I can decrypt on devices running Lollipop. However I have a Nexus 6 running marshmallow and this crashes giving the error: java.lang.RuntimeException: Unable to create application com.android.test: java.lang.ClassCastException: android.security.keystore.AndroidKeyStoreRSAPrivateKey cannot be cast to java.security.interfaces.RSAPrivateKey Here is the code it

Enable TLSv1.2 and TLS_RSA_WITH_AES_256_CBC_SHA256 Cipher Suite

妖精的绣舞 提交于 2019-11-27 01:07:18
问题 Server: TLS Version: v1.2 Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA256 Client: JRE 1.7 I am receiving the below error when I try to connect to the Server from Client through SSL directly: Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) The below code enables TLSv1.2 Set<String> enabledTLSSet = new HashSet<String>(Arrays.asList

Crash casting AndroidKeyStoreRSAPrivateKey to RSAPrivateKey

这一生的挚爱 提交于 2019-11-26 19:27:48
问题 I'm following this tutorial: How to use the Android Keystore to store passwords and other sensitive information. It (loosely) ties up with the Google Sample app: BasicAndroidKeyStore. I can encrypt my data using the public key, and I can decrypt on devices running Lollipop. However I have a Nexus 6 running marshmallow and this crashes giving the error: java.lang.RuntimeException: Unable to create application com.android.test: java.lang.ClassCastException: android.security.keystore