Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

No equivalent of Get-FileHash for text blobs, requires writing input to file to test output #3861

Copy link
Copy link
@dilijev

Description

@dilijev
Issue body actions

Steps to reproduce

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
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.