Skip to content

Instantly share code, notes, and snippets.

@Hashbrown777
Last active January 31, 2022 07:47
Show Gist options
  • Save Hashbrown777/b2001e01707efa1e79708bbc86700393 to your computer and use it in GitHub Desktop.
Save Hashbrown777/b2001e01707efa1e79708bbc86700393 to your computer and use it in GitHub Desktop.
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