Examples/Vulnerable_OutdatedCrypto_1.ps1

function Get-Sha1Hash {
    param($text)
    $enc = [System.Text.Encoding]::UTF8
    $buffer = $enc.GetBytes($text)
    $sha1 = New-Object System.Security.Cryptography.SHA1CryptoServiceProvider
    return $sha1.ComputeHash($buffer)
}