encrypt save support, smileys fix, bug fixes

This commit is contained in:
ingvar1995 2016-06-21 23:43:43 +03:00
parent dd53c6a842
commit 42aa102d1d
9 changed files with 18 additions and 13 deletions

View file

@ -62,9 +62,9 @@ class LibToxEncryptSave(util.Singleton):
"""
out = create_string_buffer(len(data) + TOX_PASS_ENCRYPTION_EXTRA_LENGTH)
tox_err_encryption = c_int()
self.libtoxencryptsave.tox_pass_encrypt(c_char_p(bytes(data)),
self.libtoxencryptsave.tox_pass_encrypt(c_char_p(data),
c_size_t(len(data)),
c_char_p(bytes(self._passphrase)),
c_char_p(bytes(self._passphrase, 'utf-8')),
c_size_t(len(self._passphrase)),
out,
byref(tox_err_encryption))
@ -89,7 +89,7 @@ class LibToxEncryptSave(util.Singleton):
tox_err_decryption = c_int()
self.libtoxencryptsave.tox_pass_decrypt(c_char_p(bytes(data)),
c_size_t(len(data)),
c_char_p(bytes(self._passphrase)),
c_char_p(bytes(self._passphrase, 'utf-8')),
c_size_t(len(self._passphrase)),
out,
byref(tox_err_decryption))