Created
December 6, 2019 08:47
-
-
Save demius/c30edf7634e66b67a9ed825950cfbbb6 to your computer and use it in GitHub Desktop.
Compute BACPAC hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$modelXmlPath = Read-Host "model.xml file path" | |
$hasher = [System.Security.Cryptography.HashAlgorithm]::Create("System.Security.Cryptography.SHA256CryptoServiceProvider") | |
$fileStream = new-object System.IO.FileStream ` -ArgumentList @($modelXmlPath, [System.IO.FileMode]::Open) | |
$hash = $hasher.ComputeHash($fileStream) | |
$hashString = "" | |
Foreach ($b in $hash) { $hashString += $b.ToString("X2") } | |
$fileStream.Close() | |
$hashString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment