Title: No equivalent of Get-FileHash for text blobs, requires writing input to file to test output · Issue #3861 · PowerShell/PowerShell · GitHub
Open Graph Title: No equivalent of Get-FileHash for text blobs, requires writing input to file to test output · Issue #3861 · PowerShell/PowerShell
X Title: No equivalent of Get-FileHash for text blobs, requires writing input to file to test output · Issue #3861 · PowerShell/PowerShell
Description: 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 int...
Open Graph Description: 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 ...
X Description: 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 ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3861
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No equivalent of Get-FileHash for text blobs, requires writing input to file to test output","articleBody":"Steps to reproduce\r\n------------------\r\nTry one of these to compare with test vector:\r\n`Write-Output \"\" | Get-FileHash -Algorithm SHA512` \r\n`Get-FileHash -Algorithm SHA512 \"\"` \r\n\r\nExpected behavior\r\n-----------------\r\ncmdlet 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.\r\n\r\nSupporting this would be helpful for hashing generated text contents without necessarily having to write that file to disk.\r\n\r\nCompare with `shasum -a 512 -t \"input-text\"` or empty-string input test vector (pipe from null) `shasum -a 512 \u003c /dev/null`\r\n\r\nActual behavior\r\n---------------\r\nUnable to take the hash of anything other than a file.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nName Value\r\n---- -----\r\nPSVersion 5.1.15063.296\r\nPSEdition Desktop\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion 10.0.15063.296\r\nCLRVersion 4.0.30319.42000\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n```\r\n","author":{"url":"https://github.com/dilijev","@type":"Person","name":"dilijev"},"datePublished":"2017-05-25T01:13:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3861/PowerShell/issues/3861"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:163f1dbe-2ac2-5ba1-a318-a640d333c638 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C074:31054F:93B36:C84E2:6A5585F5 |
| html-safe-nonce | b930332224c76dfd2b47ceeaab3ada35f5de7d2fd82a583bed722748fbb71286 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDc0OjMxMDU0Rjo5M0IzNjpDODRFMjo2QTU1ODVGNSIsInZpc2l0b3JfaWQiOiI3MjYwMDk4NzQ3NjkwMjIzMDkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d696bbbc3aedd0934bfe7b029c8c14bdceec63eac95eeb263606105ba42bbdc4 |
| hovercard-subject-tag | issue:231213724 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3861/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6786303e0538e28c326ab1e078585e7bf16177cfd633573788516707e4d0d85e/PowerShell/PowerShell/issues/3861 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6786303e0538e28c326ab1e078585e7bf16177cfd633573788516707e4d0d85e/PowerShell/PowerShell/issues/3861 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dilijev |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3215163789b3dc58dba97bd78a30c20c949f477f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width