summaryrefslogtreecommitdiffstats
path: root/utils/src/hiperf.cc
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-02-27 15:22:51 +0100
committerMauro Sardara <msardara@cisco.com>2020-02-27 15:22:51 +0100
commit3c532dd5e1844e0f094e2ae7555b1f65a2fd106f (patch)
tree999c31ee428c7686acfb4c7fbc4d28a1a5aa141f /utils/src/hiperf.cc
parentbd8380012c308a79861e2e52919e9ff6326d45dc (diff)
[HICN-538] Use type utils::CryptoHashtype instead of HashAlgorithm everywhere
Change-Id: Iddbc427611c888b28059170a70c0925ebb299cb5 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'utils/src/hiperf.cc')
-rw-r--r--utils/src/hiperf.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/src/hiperf.cc b/utils/src/hiperf.cc
index 15bcb7405..e037e1309 100644
--- a/utils/src/hiperf.cc
+++ b/utils/src/hiperf.cc
@@ -157,7 +157,7 @@ struct ServerConfiguration {
content_lifetime(600000000_U32),
content_object_size(1440),
download_size(20 * 1024 * 1024),
- hash_algorithm(HashAlgorithm::SHA_256),
+ hash_algorithm(utils::CryptoHashType::SHA_256),
keystore_name(""),
passphrase(""),
keystore_password("cisco"),
@@ -181,7 +181,7 @@ struct ServerConfiguration {
std::uint32_t content_lifetime;
std::uint16_t content_object_size;
std::uint32_t download_size;
- HashAlgorithm hash_algorithm;
+ utils::CryptoHashType hash_algorithm;
std::string keystore_name;
std::string passphrase;
std::string keystore_password;
@@ -841,7 +841,7 @@ class HIperfServer {
std::shared_ptr<utils::Identity> getProducerIdentity(
std::string &keystore_name, std::string &keystore_password,
- HashAlgorithm &hash_algorithm) {
+ utils::CryptoHashType &hash_algorithm) {
if (access(keystore_name.c_str(), F_OK) != -1) {
return std::make_shared<utils::Identity>(keystore_name, keystore_password,
hash_algorithm);
@@ -1335,11 +1335,11 @@ int main(int argc, char *argv[]) {
}
case 'y': {
if (strncasecmp(optarg, "sha256", 6) == 0) {
- server_configuration.hash_algorithm = HashAlgorithm::SHA_256;
+ server_configuration.hash_algorithm = utils::CryptoHashType::SHA_256;
} else if (strncasecmp(optarg, "sha512", 6) == 0) {
- server_configuration.hash_algorithm = HashAlgorithm::SHA_512;
+ server_configuration.hash_algorithm = utils::CryptoHashType::SHA_512;
} else if (strncasecmp(optarg, "crc32", 5) == 0) {
- server_configuration.hash_algorithm = HashAlgorithm::CRC32C;
+ server_configuration.hash_algorithm = utils::CryptoHashType::CRC32C;
} else {
std::cerr << "Ignored unknown hash algorithm. Using SHA 256."
<< std::endl;