Skip to content

Instantly share code, notes, and snippets.

@Hashbrown777
Last active Jan 31, 2022
Embed
What would you like to do?
Hashing stuff
[System.Convert]::ToBase64String([byte[]](
(Get-FileHash <#FILE#>).Hash `
-replace '..','0x$& ' `
-split ' '
)) `
-replace '/','_' `
-replace '\+','-' `
-replace '=',''
#| openssl dgst -md5 -binary | openssl enc -base64 | tr '/+' '_-' | tr -d '='
| md5sum | xxd -r -p -l 32 | tr '/+' '_-' | tr -d '='
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