Skip to content

Instantly share code, notes, and snippets.

@daniiiol
Created December 2, 2023 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniiiol/d8e22ca8f954bb41bb4fa7ce83fc50ec to your computer and use it in GitHub Desktop.
Save daniiiol/d8e22ca8f954bb41bb4fa7ce83fc50ec to your computer and use it in GitHub Desktop.
Create a SHA256 string of a string with Powershell
$ClearString = "<yourString>"
$hasher = [System.Security.Cryptography.HashAlgorithm]::Create('sha256')
$hash = $hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($ClearString))
$hashString = [System.BitConverter]::ToString($hash)
$hashString.Replace('-', '').ToLower()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment