I am currently participating in billing in the application using the Android sample code. However, when I run the sample application, I get a rather strange error:
java.lang.IllegalArgumentException:
java.security.spec.InvalidKeySpecException: java.lang.ClassCastException:
com.android.org.bouncycastle.asn1.DERApplicationSpecific cannot be cast to
com.android.org.bouncycastle.asn1.ASN1Sequence
The application expects the public key from the Android page to be encoded in base64. I did this using a web application encoding the public key to base64, and then also checked if the encoding really works. A comparison of bytes by bytes showed that the content was equal.
Have any of you had this problem before and can give me a hint, what does this exception message above mean?
Thanks a lot, Matthias
source
share