diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-05 17:12:59 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-06 17:24:46 -0700 |
| commit | 3f6f9f3f4d48ef0115f3095f7d8d2c6d3b0c63e1 (patch) | |
| tree | ad248a377dee440ac77bf9775eb95dc637a09117 /toolsrc/src | |
| parent | c1257f988a49b167cd9d94a0931806c6e465700a (diff) | |
| download | vcpkg-3f6f9f3f4d48ef0115f3095f7d8d2c6d3b0c63e1.tar.gz vcpkg-3f6f9f3f4d48ef0115f3095f7d8d2c6d3b0c63e1.zip | |
[metrics] Use new string-hash functions instead of ps1 script
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/metrics.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 9e17b237d..4067efc95 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -264,17 +264,10 @@ namespace vcpkg::Metrics while (next != last) { - auto match = *next; + const auto match = *next; if (match[0] != "00-00-00-00-00-00") { - const std::string matchstr = match[0]; - const System::PowershellParameter value("Value", matchstr); - auto hash_result = System::powershell_execute_and_capture_output( - "SHA256Hash", get_vcpkg_root() / "scripts" / "SHA256Hash.ps1", {value}); - Util::erase_remove_if(hash_result, - [](char ch) { return !(ch >= 'A' && ch <= 'F') && !(ch >= '0' && ch <= '9'); }); - hash_result = Strings::ascii_to_lowercase(hash_result); - return hash_result; + return vcpkg::Commands::Hash::get_string_hash(match[0], "SHA256"); } ++next; } |
