support/install_command.ps1 in mixlib-install-1.0.3 vs support/install_command.ps1 in mixlib-install-1.0.4
- old
+ new
@@ -21,10 +21,10 @@
return @($md.url, $md.sha256)
}
Function Get-SHA256($src) {
Try {
- $c = New-Object -TypeName System.Security.Cryptography.SHA256CryptoServiceProvider
+ $c = New-Object -TypeName System.Security.Cryptography.SHA256Managed
$bytes = $c.ComputeHash(($in = (Get-Item $src).OpenRead()))
return ([System.BitConverter]::ToString($bytes)).Replace("-", "").ToLower()
} Finally { if (($c -ne $null) -and ($c.GetType().GetMethod("Dispose") -ne $null)) { $c.Dispose() }; if ($in -ne $null) { $in.Dispose() } }
}