Skip to content

Commit 40f5cbb

Browse files
authored
Update README with usage scenario examples
1 parent d71522a commit 40f5cbb

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,32 @@ The execution order for the entire process is as follows:
5353
-input >> --input-finalizer >> [cyclist begin // --algorithm >> Compute >> --output-finalizer >> --output \\ cyclist end]
5454
```
5555

56+
Usage Scenario Examples
57+
-----------------------
58+
59+
#### Random CRC32 hash for every call:
60+
```
61+
HashifyCLI -i "DateTimeOffset.UtcNow.Ticks.ToString()" -a "CRC" -cp "CRC=CRC32"
62+
```
63+
64+
#### Validate Hash - Ensure the computed hash equals to pre-computed hash
65+
```
66+
HashifyCLI -i "ReadAllBytes('HashifyNET.dll')" -if "Input" -a "MD5" -of "AsHexString() != '18c5770ef035f90924b988f2a947362a' ? Fail('Hash Mismatch').ToString() : 'Hash Matches!'"
67+
```
68+
69+
> [!NOTE]
70+
> Call to Fail interrupts the entire execution and causes the CLI to return status code 2.
71+
72+
#### Compute Argon2id
73+
```
74+
HashifyCLI -i "'Hello World'" -a "Argon2id" -cp "Argon2id=OWASP" -of "Decode()"
75+
```
76+
77+
#### Compute Argon2id and Print Directly (no timestamp)
78+
```
79+
HashifyCLI -i "'Hello World'" -a "Argon2id" -cp "Argon2id=OWASP" -of "Decode()" -o "PrintDirect(Result)"
80+
```
81+
5682
JSON Support
5783
------------
5884
The CLI supports JSON config files to be passed with the `-cf` or `--config-file` parameter. This JSON file must contain config profiles or preferences for any supported hash algorithm that you'd use.

0 commit comments

Comments
 (0)