Skip to content

Instantly share code, notes, and snippets.

@benrobot
Created May 11, 2017 17:17
Show Gist options
  • Save benrobot/67bacea1b1bbe4eb0d9529ba2c65b2a6 to your computer and use it in GitHub Desktop.
Save benrobot/67bacea1b1bbe4eb0d9529ba2c65b2a6 to your computer and use it in GitHub Desktop.
Powershell one liner to Hash a string using SHA256
new-object System.Security.Cryptography.SHA256Managed | ForEach-Object {$_.ComputeHash([System.Text.Encoding]::UTF8.GetBytes("The string to hash goes here"))} | ForEach-Object {$_.ToString("x2")} | Write-Host -NoNewline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment