diff options
author | Yesudeep Mangalapilly <yesudeep@gmail.com> | 2011-08-16 14:30:48 +0530 |
---|---|---|
committer | Yesudeep Mangalapilly <yesudeep@gmail.com> | 2011-08-16 14:30:48 +0530 |
commit | 03c51e75de8f9969f3fd5f3885a33ef04ce7348a (patch) | |
tree | 828db6ba67a52aab6323981fbd7d0bfa5074e605 /rsa/transform.py | |
parent | f9981d28e8ef4a037f6d2598515e425b6c3fef11 (diff) | |
download | rsa-03c51e75de8f9969f3fd5f3885a33ef04ce7348a.tar.gz |
Parellelized testing. Caught a lot of bugs.
Diffstat (limited to 'rsa/transform.py')
-rw-r--r-- | rsa/transform.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/rsa/transform.py b/rsa/transform.py index 7dba2e0..9ba2fe7 100644 --- a/rsa/transform.py +++ b/rsa/transform.py @@ -14,10 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -'''Data transformation functions. +"""Data transformation functions. From bytes to a number, number to bytes, etc. -''' +""" from __future__ import absolute_import @@ -64,22 +64,6 @@ def _int2bytes(number, block_size=0): @throws OverflowError when block_size is given and the number takes up more bytes than fit into the block. - - >>> _int2bytes(123456789) - b'\x07[\xcd\x15' - >>> bytes2int(int2bytes(123456789)) - 123456789 - - >>> _int2bytes(123456789, 6) - b'\x00\x00\x07[\xcd\x15' - >>> bytes2int(int2bytes(123456789, 128)) - 123456789 - - >>> _int2bytes(123456789, 3) - Traceback (most recent call last): - ... - OverflowError: Needed 4 bytes for number, but block size is 3 - """ # Type checking if not is_integer(number): |