Closed mithrandi closed 8 years ago
Having said that, after writing a bunch of code, it seems that dealing with "native strings" is really quite awkward, since all the cryptography
APIs take bytes on both Python 2 and Python 3 :(
I think I'll (or you 🤓) add a method as_bytes()
to end this misery. Native string are the devil.
As far as I can tell, the intention is that
_pem_str
is unicode on Python 3. But__repr__
tries to pass it tohashlib.sha1
which requires bytes, thus explosions.