I'm unable to reproduce an openssl md5 hash in powershell. The openssl command to generate the md5 hash uses the '-binary' switch and I do not know what the equivalent function in powershell is. Is there a way to reproduce openssl's '-binary' switch in powershell?
Openssl:
md5="$(openssl md5 -binary < "files/$file" | base64)"
Powershell:
$md5 = (Get-FileHash $file -Algorithm md5).hash
$md5base64 = [System.Convert]::ToBase64String($utf8.GetBytes($md5))