diff options
author | 2020-02-27 14:33:01 +0000 | |
---|---|---|
committer | 2020-02-27 14:33:01 +0000 | |
commit | 0fe06328d8bb8a174f0e9a246b437e5eaf2a7628 (patch) | |
tree | a8485c9952bf7bbc09ac6209b25352841a36371f /libtransport/src/implementation | |
parent | 40133d80a41f438b469b6c94e87fea2a00affa81 (diff) | |
parent | 3c532dd5e1844e0f094e2ae7555b1f65a2fd106f (diff) |
Merge "[HICN-538] Use type utils::CryptoHashtype instead of HashAlgorithm everywhere"
Diffstat (limited to 'libtransport/src/implementation')
3 files changed, 7 insertions, 7 deletions
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<BasePortal>, 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<BasePortal>, // 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<BasePortal>, } 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<BasePortal>, } 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<BasePortal>, // function std::unordered_map<Name, std::unordered_map<int, uint32_t>> seq_number_map_; - std::atomic<HashAlgorithm> hash_algorithm_; + std::atomic<utils::CryptoHashType> hash_algorithm_; std::atomic<utils::CryptoSuite> crypto_suite_; utils::SpinLock signer_lock_; std::shared_ptr<utils::Signer> signer_; |