[PYTHON-CRYPTO] string <-> int conversion

Paul Rubin phr-pycrypt at nightsong.com
Fri Nov 9 10:45:19 CET 2001


The python library has no direct base 256 conversion function and it's
too late to get a patch into 2.2.  However, converting long to hex
with hex(...) and then using binascii for binary output, or binascii
for binary to hex followed by long(h,16) to convert hex to long, is
reasonably fast.





More information about the python-crypto mailing list