You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No equivalent of Get-FileHash for text blobs, requires writing input to file to test output #3861
Try one of these to compare with test vector: Write-Output "" | Get-FileHash -Algorithm SHA512 Get-FileHash -Algorithm SHA512 ""
Expected behavior
cmdlet for getting the hash of a blob without having to write to an intermediate file (does not need to be Get-FileHash, which would admittedly be confusing, but supporting input pipe would be nice and unambiguous.
Supporting this would be helpful for hashing generated text contents without necessarily having to write that file to disk.
Compare with shasum -a 512 -t "input-text" or empty-string input test vector (pipe from null) shasum -a 512 < /dev/null
Actual behavior
Unable to take the hash of anything other than a file.
Environment data
Name Value
---------
PSVersion 5.1.15063.296
PSEdition Desktop
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
BuildVersion 10.0.15063.296
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Activity
iSazonov commentedon May 25, 2017
Doug Ilijev (@dilijev) Thanks for you report!
Please see PowerShell/PowerShell-RFC#65 and #3395