threema-gateway 0.1.0

A client library for the Threema Gateway.
Documentation

Rust SDK for Threema Gateway

Travis CI Crates.io Rust

This is a work-in-progress implementation of a Threema Gateway client library in Rust.

Docs

Features

Sending

  • Send simple messages
  • Send end-to-end encrypted 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

  • Verify MAC of incoming message
  • Decrypt incoming message

Files

  • Download files
  • Upload files

Usage

Take a look at the examples in the examples/ directory to see how they're implemented.

Lookup 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 -- <from> <to> <secret> <text>...

License

Licensed under either of

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.