summaryrefslogtreecommitdiff
path: root/rsa
diff options
context:
space:
mode:
authorSybren A. St?vel <sybren@stuvel.eu>2016-01-18 15:39:00 +0100
committerSybren A. St?vel <sybren@stuvel.eu>2016-01-18 15:39:00 +0100
commit533aba5392581833f6cff91944db5afbcba67833 (patch)
tree7771dd2d827541666ceff5fdc7841f7fce6ec08c /rsa
parent2811e9264205264dea49fb12b98b16d09de679d0 (diff)
downloadrsa-533aba5392581833f6cff91944db5afbcba67833.tar.gz
No longer using obsolete base64 interface, fixes bug #30
Diffstat (limited to 'rsa')
-rw-r--r--rsa/pem.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa/pem.py b/rsa/pem.py
index b1c3a0e..0117ad1 100644
--- a/rsa/pem.py
+++ b/rsa/pem.py
@@ -89,7 +89,7 @@ def load_pem(contents, pem_marker):
# Base64-decode the contents
pem = b('').join(pem_lines)
- return base64.decodestring(pem)
+ return base64.standard_b64decode(pem)
def save_pem(contents, pem_marker):
@@ -106,7 +106,7 @@ def save_pem(contents, pem_marker):
(pem_start, pem_end) = _markers(pem_marker)
- b64 = base64.encodestring(contents).replace(b('\n'), b(''))
+ b64 = base64.standard_b64encode(contents).replace(b('\n'), b(''))
pem_lines = [pem_start]
for block_start in range(0, len(b64), 64):