2

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?

Community
  • 1
  • 1
IamAlexAlright
  • 1,500
  • 1
  • 16
  • 29

1 Answers1

2

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.

IamAlexAlright
  • 1,500
  • 1
  • 16
  • 29