diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-06-20 01:06:39 +0200 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-06-20 01:06:39 +0200 |
commit | 62abca7fce2b3c4e9b16b43209371bf3c225fb6d (patch) | |
tree | 0cea32fbadc8bab97e509d7f095b5564ae810b0e /rsa/transform.py | |
parent | 0060065bf34d426bc634ff6dac1ac9475ca4687e (diff) | |
download | rsa-62abca7fce2b3c4e9b16b43209371bf3c225fb6d.tar.gz |
Added block padding to be able to work with leading zeroes, breaks all kind of stuff
Diffstat (limited to 'rsa/transform.py')
-rw-r--r-- | rsa/transform.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rsa/transform.py b/rsa/transform.py index 9cd1ef3..6719dcb 100644 --- a/rsa/transform.py +++ b/rsa/transform.py @@ -12,7 +12,9 @@ def bit_size(number): return int(math.ceil(math.log(number,2))) def bytes2int(bytes): - """Converts a list of bytes or a string to an integer + """Converts a list of bytes or an 8-bit string to an integer. + + When using unicode strings, encode it to some encoding like UTF8 first. >>> (((128 * 256) + 64) * 256) + 15 8405007 |