i am using PyCrypto within Django (Python 2.7, Django 1.5m SQLite), i would like to create a field to store an RSAkey object. How can i do this? Converting to a string and back seems pretty error prone and since random bytes are in there, i would not trust that to be a good approach. I was able to store random keys in a charfield by base-64 encoding it (like this: Random.new().read(16).encode('base64')). But a keypair? I saw in the current dev version of Django, a binary field is incorporated, but we need to stick to 1.5.
Any help would really be appreciated.
Thanks Gerd