From d1060d36697efcd1179ffdbc7b16d3a68643b8c5 Mon Sep 17 00:00:00 2001 From: Yesudeep Mangalapilly Date: Tue, 16 Aug 2011 14:45:38 +0530 Subject: Adds common includes and tests. --- rsa/_compat.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rsa/_compat.py') diff --git a/rsa/_compat.py b/rsa/_compat.py index 7533c36..3c4eb81 100644 --- a/rsa/_compat.py +++ b/rsa/_compat.py @@ -76,6 +76,11 @@ except NameError: bytes_type = str +# To avoid calling b() multiple times in tight loops. +ZERO_BYTE = b('\x00') +EMPTY_BYTE = b('') + + def is_bytes(obj): """ Determines whether the given value is a byte string. -- cgit v1.2.1