Hi just wondering if anybody can help me out? I have piece of code to workout the Sha-1 of a folder but need to convert it to get the sha-256.
function Get-FolderHash ($folder) {
dir $folder -Recurse | ?{!$_.psiscontainer} | %{[Byte[]]$contents += [System.IO.File]::ReadAllBytes($_.fullname)}
$hasher = [System.Security.Cryptography.SHA1]::Create()
[string]::Join("",$($hasher.ComputeHash($contents) | %{"{0:x2}" -f $_}))
}
Get-FolderHash out
I also need to get the equivalent in 2 other programming languages if anyone has any tips. Thank you