feat: add --binary(-b) option to hash commands (#5885)

For instance,

```
echo 'abcdefghijklmnopqrstuvwxyz' | hash sha256 --binary
```

Will returns the hash as a binary value instead of a hexadecimaly encoded string.
This commit is contained in:
Benoît Cortier
2022-06-26 07:50:56 -04:00
committed by GitHub
parent a142d1a192
commit 32f0f94b46
4 changed files with 61 additions and 18 deletions

View File

@ -23,7 +23,7 @@ impl Command for DecodeBase64 {
)
.switch(
"binary",
"do not decode payload as UTF-8 and output binary",
"Output a binary value instead of decoding payload as UTF-8",
Some('b'),
)
.rest(