You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To streamline interoperability between Vodozemac and python-olm, introduce helper functions that handle Base64 encoding and decoding of message attributes (ciphertext, mac, ephemeral_key) directly in Rust. This will remove the need for manual encoding on the Python side and improve usability.
With the help of the compatible base64_decode and base64_encode functions in Vodozemac, which handle base64 padding, I was able to directly implement this functionality in #15 .
The PR introduces a from_base64 class method and a to_base64 method, enabling straightforward usage as follows:
# Converting from base64vodo_msg=Message.from_base64(
olm_msg.ciphertext,
olm_msg.mac,
olm_msg.ephemeral_key,
)
# Converting to base64ephemeral_key_b64, mac_b64, ciphertext_b64=vodo_msg.to_base64()
To streamline interoperability between Vodozemac and python-olm, introduce helper functions that handle Base64 encoding and decoding of message attributes (
ciphertext
,mac
,ephemeral_key
) directly in Rust. This will remove the need for manual encoding on the Python side and improve usability.Current example:
A future enhancement could add a Rust helper function to handle this encoding automatically, such as:
This would provide a clearer API, as different message encodings in use can be unclear to the user.
See: #15
The text was updated successfully, but these errors were encountered: