summaryrefslogtreecommitdiff
path: root/rsa/varblock.py
diff options
context:
space:
mode:
Diffstat (limited to 'rsa/varblock.py')
-rw-r--r--rsa/varblock.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rsa/varblock.py b/rsa/varblock.py
index b8bd899..51e04fc 100644
--- a/rsa/varblock.py
+++ b/rsa/varblock.py
@@ -31,6 +31,7 @@ This file format is called the VARBLOCK format, in line with the varint format
used to denote the block sizes.
'''
+from rsa._compat import byte
VARBLOCK_VERSION = 1
@@ -88,7 +89,7 @@ def write_varint(outfile, value):
if value > 0:
to_write |= 0x80
- outfile.write(chr(to_write))
+ outfile.write(byte(to_write))
written_bytes += 1
return written_bytes