In reference to this discussion: Decode South African (ZA) Drivers License Please assist I seem to be getting an error trying to create PublicKey instance in Java on android. I have pasted the error below: Here is the code snippet: Answer The encoded public keys you’re trying to read are not of the format expected by X509EncodedKeySpec. Instead they are
Tag: public-key
How to load public certificate from pem file?
I was trying to extract RES public key from the file below Here is the code i did.. But It throws out java.security.InvalidKeyException: IOException: ObjectIdentifier() — data isn’t an object ID What’s the appropriate way to extract RES Public key from a file.. Answer An X.509 certificate and an X509EncodedKeySpec are quite different structures, and trying to parse a cert