From 35058cdfe0134c88f1aa8d23342d1d7b9d39e296 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Tue, 7 Jan 2020 11:46:02 +0100 Subject: [HICN-2] Added P2P confidential communication on hICN P2P confidential communications exploit the TLS 1.3 protocol to let a consumer to establish a secure communication on an hICN name. Currently we don't support the consumer authentication (mutual authentication in TLS) and the 0-rtt session establishment. Change-Id: I2be073847c08a17f28c837d444081920c5e57a07 Signed-off-by: Alberto Compagno Signed-off-by: Olivier Roques Signed-off-by: Mauro Sardara --- libtransport/src/hicn/transport/core/name.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libtransport/src/hicn/transport/core/name.h') diff --git a/libtransport/src/hicn/transport/core/name.h b/libtransport/src/hicn/transport/core/name.h index 35625ddd1..ea72797ad 100644 --- a/libtransport/src/hicn/transport/core/name.h +++ b/libtransport/src/hicn/transport/core/name.h @@ -81,7 +81,7 @@ class Name { bool equals(const Name &name, bool consider_segment = true) const; - uint32_t getHash32() const; + uint32_t getHash32(bool consider_suffix = true) const; void clear(); @@ -112,10 +112,27 @@ class Name { std::ostream &operator<<(std::ostream &os, const Name &name); +template +struct hash {}; + +template <> +struct hash { + size_t operator()(const transport::core::Name &name) const; +}; + +template +struct compare2 {}; + +template <> +struct compare2 { + size_t operator()(const transport::core::Name &name1, const transport::core::Name &name2) const; +}; + } // end namespace core } // end namespace transport + namespace std { template <> struct hash { -- cgit 1.2.3-korg