diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/SHA256Hash.ps1 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/SHA256Hash.ps1 b/scripts/SHA256Hash.ps1 new file mode 100644 index 000000000..348d461b7 --- /dev/null +++ b/scripts/SHA256Hash.ps1 @@ -0,0 +1,9 @@ +[CmdletBinding()]
+Param(
+ [Parameter(Mandatory=$True)]
+ [String]$Value
+)
+
+$sha256 = New-Object -TypeName System.Security.Cryptography.SHA256CryptoServiceProvider
+$utf8 = New-Object -TypeName System.Text.UTF8Encoding
+[System.BitConverter]::ToString($sha256.ComputeHash($utf8.GetBytes($Value)))
|
