Bad base64 Decode - M2Crypto - Python - Android - RSA
-
21-04-2021 - |
Question
Trying to implement the signature verification of inapp billing on my server (Django/Python).
I found this great topic but I'm having issues with this line:
rsa = RSA.load_pub_key_bio(bio)
If I do it exactly as it is coded there I get a "RSAError: no start line" [and this makes sense since python didnt really like how pem was defined]
I decided to put my key into a .pem file and load it with
rsa = RSA.load_pub_key("public.pem")
However, I get a "RSAError: bad base64 decode" . Any ideas?
Solution
Okay, found and fixed my problem (but an explanation would be neat).
I had to have a \n every 75 chars ... formatting it like this made it work.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow