Last active
January 31, 2022 07:47
-
-
Save Hashbrown777/b2001e01707efa1e79708bbc86700393 to your computer and use it in GitHub Desktop.
Hashing stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.Convert]::ToBase64String([byte[]]( | |
(Get-FileHash <#FILE#>).Hash ` | |
-replace '..','0x$& ' ` | |
-split ' ' | |
)) ` | |
-replace '/','_' ` | |
-replace '\+','-' ` | |
-replace '=','' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#| openssl dgst -md5 -binary | openssl enc -base64 | tr '/+' '_-' | tr -d '=' | |
| md5sum | xxd -r -p -l 32 | tr '/+' '_-' | tr -d '=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-FileHash ` | |
-Algorithm MD5 ` | |
-InputStream ([IO.MemoryStream]::new([System.Text.Encoding]::UTF8.GetBytes( | |
<#string#> | |
))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment