From 5922f678003e5d1ba2125c7c7f6246fcd23304c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrienberaud@gmail.com> Date: Thu, 20 Nov 2014 18:57:52 -0500 Subject: [PATCH] Update README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c5816e9d..7b33b54a 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,10 @@ A lightweight C++11 Distributed Hash Table implementation * Light C++11 Kademlia DHT library * Simple API * Support for arbitrary value types (with common types built-in) - * Optional crypto layer with data signature and encryption (using GnuTLS) + * Optional crypto/identity layer with data signature and encryption (using GnuTLS) * Value edition authentified by the crypto layer or with custom per-value-type hooks * Fast bootstrap and announce time + * Not compatible with Bittorrent DHT (mainline). * Originally based on https://github.com/jech/dht by Juliusz Chroboczek ***work in progress*** @@ -37,14 +38,17 @@ Examples int main() { dht::DhtRunner node; - // Launch a dht node on a new thread, using - // generated RSA keys, and listen on port 4222. + // Launch a dht node on a new thread, using a + // generated RSA key pair, and listen on port 4222. node.run(4222, dht::crypto::generateIdentity(), true); // put some data on the dht std::vector<uint8_t> some_data(5, 10); node.put("unique_key", some_data); + // put some data on the dht, signed with our generated private key + node.putSigned("unique_key_42", some_data); + // get data from the dht node.get("other_unique_key", [](const std::vector<std::shared_ptr<Value>>& values) { // Callback called when values are found -- GitLab