Commit 7538a1ec authored by poljar's avatar poljar

olm: Rename the errors function argument in the decryption functions.

parent fec41f95
......@@ -176,7 +176,7 @@ class InboundGroupSession(object):
raise OlmGroupSessionError(last_error)
def decrypt(self, ciphertext, errors="replace"):
def decrypt(self, ciphertext, unicode_errors="replace"):
# type: (AnyStr, str) -> Tuple[str, int]
"""Decrypt a message
......@@ -232,7 +232,7 @@ class InboundGroupSession(object):
plaintext = to_unicode_str(
ffi.unpack(plaintext_buffer, plaintext_length),
errors=errors
errors=unicode_errors
)
# clear out copies of the plaintext
......
......@@ -313,7 +313,7 @@ class PkDecryption(object):
return obj
def decrypt(self, message, errors="replace"):
def decrypt(self, message, unicode_errors="replace"):
# type (PkMessage, str) -> str
"""Decrypt a previously encrypted Pk message.
......@@ -361,7 +361,7 @@ class PkDecryption(object):
# clear out copies of the plaintext
lib.memset(plaintext_buffer, 0, max_plaintext_length)
return to_unicode_str(plaintext, errors=errors)
return to_unicode_str(plaintext, errors=unicode_errors)
def _clear_pk_signing(pk_struct):
......
......@@ -273,7 +273,7 @@ class Session(object):
else: # pragma: no cover
raise ValueError("Unknown message type")
def decrypt(self, message, errors="replace"):
def decrypt(self, message, unicode_errors="replace"):
# type: (_OlmMessage, str) -> str
"""Decrypts a message using the session. Returns the plaintext string
on success. Raises OlmSessionError on failure. If the base64 couldn't
......@@ -320,7 +320,7 @@ class Session(object):
self._check_error(plaintext_length)
plaintext = to_unicode_str(
ffi.unpack(plaintext_buffer, plaintext_length),
errors=errors
errors=unicode_errors
)
# clear out copies of the plaintext
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment