- Notifications
You must be signed in to change notification settings - Fork9
Rust SDK for Threema Gateway.
License
Apache-2.0, MIT licenses found
Licenses found
dbrgn/threema-gateway-rs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a mostly-complete implementation of an asynchronous Threema Gatewayclient library in Rust. For implementation status, see feature list below.
Sending
- Send simple messages
- Send end-to-end encrypted messages
Encrypting
- Encrypt raw bytes
- Encrypt text messages
- Encrypt image messages
- Encrypt file messages
- Encrypt delivery receipt messages
Lookup
- Look up ID by phone number
- Look up ID by e-mail
- Look up ID by phone number hash
- Look up ID by e-mail hash
- Look up capabilities by ID
- Look up public key by ID
- Look up remaining credits
Receiving
- Decode incoming request body
- Verify MAC of incoming message
- Decrypt incoming message
- Decode incoming message
Files
- Upload files
- Download files
Take a look at the examples in theexamples/ directory to see how they'reimplemented.
Generate a new keypair:
cargo run --example generate_keypairLookup public key:
cargo run --example lookup_pubkey -- <our_id> <secret> <their_id>Send simple transport-encrypted encrypted message:
cargo run --example send_simple -- <from> id <to-id> <secret> <text>...cargo run --example send_simple -- <from> email <to-email> <secret> <text>...cargo run --example send_simple -- <from> phone <to-phone> <secret> <text>...Send e2e encrypted message:
cargo run --example send_e2e_text -- <from> <to> <secret> <private-key> <text>...Look up Threema ID by phone:
cargo run --example lookup_id -- by_phone <from> <secret> 41791234567Look up Threema ID by email hash:
cargo run --example lookup_id -- by_email_hash <from> <secret> 1ea093239cc5f0e1b6ec81b866265b921f26dc4033025410063309f4d1a8ee2cDecode and decrypt an incoming message payload:
cargo run --example receive -- <our-id> <secret> <private-key> <request-body>Download a blob:
cargo run --example download_blob -- <our-id> <secret> <private-key> <blob-id>This library offers the following optional features:
receive: Add support for processing incoming messages. Enabled by default.
This library generally tracks the latest stable Rust version but tries toguarantee backwards compatibility with older stable versions as much aspossible. However, in many cases transitive dependencies make guaranteeing aminimal supported Rust version impossible (seethisdiscussion).
This library usesrustls with native(system-provided) root certificates to establish a TLS connection.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE orhttp://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT orhttp://opensource.org/licenses/MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in the work by you, as defined in the Apache-2.0 license, shallbe dual licensed as above, without any additional terms or conditions.
About
Rust SDK for Threema Gateway.
Topics
Resources
License
Apache-2.0, MIT licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.