From 3c532dd5e1844e0f094e2ae7555b1f65a2fd106f Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Thu, 27 Feb 2020 15:22:51 +0100 Subject: [HICN-538] Use type utils::CryptoHashtype instead of HashAlgorithm everywhere Change-Id: Iddbc427611c888b28059170a70c0925ebb299cb5 Signed-off-by: Mauro Sardara --- libtransport/src/implementation/p2psecure_socket_producer.cc | 2 +- libtransport/src/implementation/p2psecure_socket_producer.h | 2 +- libtransport/src/implementation/socket_producer.h | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'libtransport/src/implementation') diff --git a/libtransport/src/implementation/p2psecure_socket_producer.cc b/libtransport/src/implementation/p2psecure_socket_producer.cc index d7161986b..d0852539a 100644 --- a/libtransport/src/implementation/p2psecure_socket_producer.cc +++ b/libtransport/src/implementation/p2psecure_socket_producer.cc @@ -367,7 +367,7 @@ int P2PSecureProducerSocket::setSocketOption( } int P2PSecureProducerSocket::setSocketOption( - int socket_option_key, HashAlgorithm socket_option_value) { + int socket_option_key, utils::CryptoHashType socket_option_value) { if (!list_secure_producers.empty()) for (auto it = list_secure_producers.cbegin(); it != list_secure_producers.cend(); it++) diff --git a/libtransport/src/implementation/p2psecure_socket_producer.h b/libtransport/src/implementation/p2psecure_socket_producer.h index c2cbf31ac..33339deba 100644 --- a/libtransport/src/implementation/p2psecure_socket_producer.h +++ b/libtransport/src/implementation/p2psecure_socket_producer.h @@ -84,7 +84,7 @@ class P2PSecureProducerSocket : public ProducerSocket { ProducerContentCallback socket_option_value) override; int setSocketOption(int socket_option_key, - HashAlgorithm socket_option_value) override; + utils::CryptoHashType socket_option_value) override; int setSocketOption(int socket_option_key, utils::CryptoSuite socket_option_value) override; diff --git a/libtransport/src/implementation/socket_producer.h b/libtransport/src/implementation/socket_producer.h index 1f03fe53d..54fca4fdf 100644 --- a/libtransport/src/implementation/socket_producer.h +++ b/libtransport/src/implementation/socket_producer.h @@ -53,7 +53,7 @@ class ProducerSocket : public Socket, async_thread_(), registration_status_(REGISTRATION_NOT_ATTEMPTED), making_manifest_(false), - hash_algorithm_(HashAlgorithm::SHA_256), + hash_algorithm_(utils::CryptoHashType::SHA_256), suffix_strategy_(core::NextSegmentCalculationStrategy::INCREMENTAL), on_interest_input_(VOID_HANDLER), on_interest_dropped_input_buffer_(VOID_HANDLER), @@ -108,7 +108,7 @@ class ProducerSocket : public Socket, // during the production std::size_t data_packet_size = data_packet_size_; uint32_t content_object_expiry_time = content_object_expiry_time_; - HashAlgorithm hash_algo = hash_algorithm_; + utils::CryptoHashType hash_algo = hash_algorithm_; bool making_manifest = making_manifest_; auto suffix_strategy = utils::SuffixStrategyFactory::getSuffixStrategy( suffix_strategy_, start_offset); @@ -648,7 +648,7 @@ class ProducerSocket : public Socket, } virtual int setSocketOption(int socket_option_key, - HashAlgorithm socket_option_value) { + utils::CryptoHashType socket_option_value) { switch (socket_option_key) { case GeneralTransportOptions::HASH_ALGORITHM: hash_algorithm_ = socket_option_value; @@ -848,7 +848,7 @@ class ProducerSocket : public Socket, } virtual int getSocketOption(int socket_option_key, - HashAlgorithm &socket_option_value) { + utils::CryptoHashType &socket_option_value) { switch (socket_option_key) { case GeneralTransportOptions::HASH_ALGORITHM: socket_option_value = hash_algorithm_; @@ -983,7 +983,7 @@ class ProducerSocket : public Socket, // function std::unordered_map> seq_number_map_; - std::atomic hash_algorithm_; + std::atomic hash_algorithm_; std::atomic crypto_suite_; utils::SpinLock signer_lock_; std::shared_ptr signer_; -- cgit 1.2.3-korg