diff --git a/edx_proctoring/backends/software_secure.py b/edx_proctoring/backends/software_secure.py index dfa88a023a9..babda446d19 100644 --- a/edx_proctoring/backends/software_secure.py +++ b/edx_proctoring/backends/software_secure.py @@ -337,7 +337,8 @@ def pad(text): """ Apply padding """ - return text + (block_size - len(text) % block_size) * chr(block_size - len(text) % block_size) + return (text + (block_size - len(text) % block_size) * + chr(block_size - len(text) % block_size)).encode('utf-8') cipher = DES3.new(key, DES3.MODE_ECB) encrypted_text = cipher.encrypt(pad(pwd)) return base64.b64encode(encrypted_text)