Skip to content

Commit f793800

Browse files
author
Leif Johansson
committed
use encodestring here too
1 parent 568d81c commit f793800

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/xmlsec/crypto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def sign(self, data, hash_alg=None):
226226
import requests
227227
import json
228228
url = '{!s}/rawsign'.format(self._keyspec)
229-
r = requests.post(url, json=dict(mech='RSAPKCS1', data=data.encode("base64")))
229+
r = requests.post(url, json=dict(mech='RSAPKCS1', data=base64.encodestring(data)))
230230
if r.status_code != requests.codes.ok:
231231
r.raise_for_status()
232232
msg = r.json()

0 commit comments

Comments
 (0)