Skip to content

Instantly share code, notes, and snippets.

@eizedev
Created October 9, 2020 09:18
Show Gist options
  • Save eizedev/1c40f16494087127d3c954ea79ceaf39 to your computer and use it in GitHub Desktop.
Save eizedev/1c40f16494087127d3c954ea79ceaf39 to your computer and use it in GitHub Desktop.
Create SHA1 Hash from Password
#insert password here
$string = "Passw0rd!"
$encoding = [System.Text.Encoding]::UTF8
$SHA1Hash = New-Object -TypeName "System.Security.Cryptography.SHA1CryptoServiceProvider"
$Hashcode = ($SHA1Hash.ComputeHash($encoding.GetBytes($string)) | ForEach-Object { "{0:X2}" -f $_ }) -join ""
Write-Output $Hashcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment