Commit graph

4 commits

Author SHA1 Message Date
Damir Jelić
2f5590bf38 olm: Allow decryption functions to define how to handle unicode decode errors.
This patch changes the decryption functions not to fail if there was an
unicode decode error while converting the decrypted bytes plaintext into
a native python string.

Characters that cannot be decoded as unicode are now replaced with the
unicode replacement character (U+FFFD).

The old behaviour of raising an UnicodeDecodeError can be achieved by
passing the "strict" error handling scheme to the decrypt function.
2019-06-18 13:50:46 +02:00
Hubert Chathi
ab6e8d5086 more isort 2019-04-12 19:17:06 -04:00
Hubert Chathi
74e9300daf add python bindings for PK signing 2019-04-08 17:19:47 -04:00
Damir Jelić
f160d693b6 python: Add PK bindings.
This patch adds bindings to the PK part of the Olm library contained in
the pk.h header file.

Encryption, decryption as well as pickling/unpickling of the decryption
object is supported.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-08 15:04:32 -04:00