3 ms·
If you're on Windows, you can calculate it in PowerShell like this: $password = "foobar" ([Security.Cryptography.SHA1CryptoServiceProvider]::Create().ComputeH
by 13of40 9y ago
If you're on Windows, you can calculate it in PowerShell like this:
$password = "foobar"
([Security.Cryptography.SHA1CryptoServiceProvider]::Create().ComputeHash([Text.Encoding]::ASCII.GetBytes($password)) | %{'{0:x2}' -f $_}) -join ""
- Spivak 9y agoAnd people say that PowerShell isn't readable or intuitive.
- 13of40 9y agoYou can also do it like this: "foobar" | Out-File password.txt -Encoding ASCII -NoNewline Get-FileHash password.txt -Algorithm SHA1 del password.txt That's readable and intuitive, but the downside is it puts your password in a file.