Skip to content

Instantly share code, notes, and snippets.

@Hashbrown777
Last active January 31, 2022 07:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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