Skip to content

Commit 2608d51

Browse files
Update README
1 parent 522b15f commit 2608d51

File tree

1 file changed

+29
-39
lines changed

1 file changed

+29
-39
lines changed

README.md

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77

88
`csum` is a CLI program which allows you to to verify checksums. The goal of `csum` is to minimise the effort required when you download a file and want to verify the checksum.
99

10+
The advantages of `csum` over the native checksum utilites are as follows:
11+
12+
- You don't have to compare checkums by eye, which might be required on some platforms.
13+
- It's easier to type.
14+
- It's the same on all platforms.
15+
- You don't have to type which checksum algorithm is being used.
16+
1017
`csum` supports the most common checksum algorithms:
1118

1219
- `MD5`
@@ -34,17 +41,35 @@ After this command completes, the `csum` executable should be available on the P
3441

3542
`csum` is designed to be as simple to use as possible. For this reason, you don't need to specify the checksum type (e.g. `sha256`); `csum` will iterate through the most common types first.
3643

44+
When you use `csum`, the response will be something like:
45+
46+
```bash
47+
--------------------------------------------------------------------------------
48+
49+
File: file.zip
50+
Algorithm: SHA256
51+
52+
Expected checksum: 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2
53+
Calculated checksum: 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2
54+
55+
Checksums match ✔
56+
57+
--------------------------------------------------------------------------------
58+
59+
SUCCESS: SHA256 checksum matched file.
60+
```
61+
3762
## Usage examples
3863

3964
### File and checksum
4065

41-
You can call `csum` with a filename and checksum:
66+
You can call `csum` with a filename and expected checksum:
4267

4368
```bash
4469
csum file.zip 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2
4570
```
4671

47-
Or a checksum and filename:
72+
Or an expected checksum and filename:
4873

4974
```bash
5075
csum 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2 file.zip
@@ -58,7 +83,7 @@ csum ~/Downloads/file.zip 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea99
5883

5984
### Preformatted checksum/filename
6085

61-
Sometimes you are provided with a checksum of the form:
86+
Sometimes you are provided with an expected checksum of the form:
6287

6388
`40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2 file.zip`
6489

@@ -78,7 +103,7 @@ csum "40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2 file.zi
78103
79104
### Manually choosing an algorithm
80105

81-
If you prefer to select a certain algorithm instead of iterating through them, you can use the `-a`/`--algorithm` parameter.
106+
If you prefer to select a particular algorithm instead of iterating through them, you can use the `-a`/`--algorithm` parameter.
82107

83108
For example, using the SHA256 algorithm only:
84109

@@ -88,41 +113,6 @@ csum -a sha256 file.zip 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925
88113

89114
> **Tip:** You can provide the algorithm name as either lower-case or upper-case, e.g. `sha256` or `SHA256`.
90115
91-
### Expected output
92-
93-
When you use `csum`, a positive response will be of the form:
94-
95-
```bash
96-
--------------------------------------------------------------------------------
97-
98-
File: file.zip
99-
Algorithm: SHA256
100-
101-
Expected checksum: 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2
102-
Calculated checksum: 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2
103-
104-
Checksums match ✔
105-
106-
--------------------------------------------------------------------------------
107-
108-
SUCCESS: SHA256 checksum matched file.
109-
```
110-
111-
A negative response will be of the form:
112-
113-
```bash
114-
--------------------------------------------------------------------------------
115-
116-
File: file.zip
117-
Expected checksum: 40f66f20b1ecb05cb11a9627520aafafbc8cd86b33eb8019cbea9925d8ca83ce2
118-
119-
Checksums do NOT match.
120-
121-
--------------------------------------------------------------------------------
122-
123-
FAILED: algorithm(s) did not match the checksum.
124-
```
125-
126116
# License
127117

128118
You may freely use, modify and redistribute this program under the terms of the MIT License. See [LICENSE](https://github.com/CabbageDevelopment/csum/blob/master/LICENSE).

0 commit comments

Comments
 (0)