diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-13 21:36:29 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-13 21:49:11 -0800 |
| commit | 415789b42e5fd43ac984902cd72848f6ef6b450a (patch) | |
| tree | 6262849933cc31b67f0081897fbcad2f800812bf /scripts | |
| parent | 1ea060d6fa9925dd9146f71b8c73a04bfcc5caf4 (diff) | |
| download | vcpkg-415789b42e5fd43ac984902cd72848f6ef6b450a.tar.gz vcpkg-415789b42e5fd43ac984902cd72848f6ef6b450a.zip | |
[vcpkg-metrics] Replace SQM with MAC hash.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/SHA256Hash.ps1 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/SHA256Hash.ps1 b/scripts/SHA256Hash.ps1 new file mode 100644 index 000000000..348d461b7 --- /dev/null +++ b/scripts/SHA256Hash.ps1 @@ -0,0 +1,9 @@ +[CmdletBinding()]
+Param(
+ [Parameter(Mandatory=$True)]
+ [String]$Value
+)
+
+$sha256 = New-Object -TypeName System.Security.Cryptography.SHA256CryptoServiceProvider
+$utf8 = New-Object -TypeName System.Text.UTF8Encoding
+[System.BitConverter]::ToString($sha256.ComputeHash($utf8.GetBytes($Value)))
|
