7f35691236
Implement the `Attachment.encrypt` and `Attachment.decrypt` methods, along with its `EncryptedAttachment` companion. The trick is to avoid copies as much as possible. Instead of dealing with `Uint8Array` as I've initially done, `&[u8]` and `Vec<u8>` is passed instead. `wasm-bindgen` is smart enough to do as few copies as possible (from JavaScript to Wasm's memory is required, and we don't want to do more), while typing everything as `Uint8Array`. `EncryptedAttachment.encryptedData` returns a copy of the data everytime it is called, and that's the last copy I'm not happy with.
Matrix Rust SDK bindings
In this directory, one can find bindings to the Rust SDK that are maintained by the owners of the Matrix Rust SDK project.
appleormatrix-rust-components-swift, Swift bindings of thematrix-sdkcrate viamatrix-sdk-ffi,matrix-sdk-crypto-ffi, bindings of thematrix-sdk-cryptocrate,matrix-sdk-crypto-js, JavaScript bindings of thematrix-sdk-cryptocrate,matrix-sdk-crypto-nodejs, Node.js bindings of thematrix-sdk-cryptocrate,matrix-sdk-ffi, bindings of thematrix-sdkcrate,