You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -32,17 +32,17 @@ HashGuard is a lean and efficient command-line tool designed to simplify the pro
32
32
Because by enclosing the URL in double quotation marks, you tell the shell to treat the entire string as a single argument, even if it contains spaces or other special characters. This can prevent errors and unexpected behavior in your shell.
33
33
34
34
*### Local-Command
35
-
* Allows to hash local files or any byte-buffer (futhermore you can also compare with a specific hash sum)
35
+
* Allows to hash local files, directories or any byte-buffer (futhermore you can also compare with a specific hash sum)
36
36
***Options**
37
-
*_file_
38
-
* Calculate a hash sum from a file on your local system
37
+
*_path_
38
+
* Calculate a hash sum from a file/dir
39
39
*_buffer_
40
40
* Calculate a hash sum from any given byte buffer
41
41
* What means byte buffer?
42
42
* For example, you can calculate a hash sum from any text that is provided as a ``String``
43
43
* As described in the download command, please enclose the text to be hashed in double quotation marks. This prevents unexpected behavior in your shell.
44
-
*_Notice_
45
-
* You can only use one option per call. So either ``file`` or ``buffer``
44
+
*_Notice_
45
+
* You can only use one option per call. So either ``path`` or ``buffer``
46
46
47
47
48
48
***Hash Verification:** Verify the authenticity of downloaded or local files by comparing their hash sum with a provided hash value.
@@ -122,17 +122,17 @@ cargo build --release
122
122
**Local-Command**
123
123
* Verify a local file with a hash sum using SHA-1:
124
124
````shell
125
-
hashguard local -f /path/to/local_file.txt a1b2c3d4e5f6 -a sha1
125
+
hashguard local -p /path/to/local_file.txt a1b2c3d4e5f6 -a sha1
126
126
````
127
127
128
128
* Calculate a hash sum from a given ``String``:
129
129
````shell
130
130
hashguard local -b "Hello young Padawan"
131
131
````
132
132
133
-
* Calculate a hash sum from a localfile with the default hash algorithm:
133
+
* Calculate a hash sum from a localdirectory with the default hash algorithm:
let msg = format!("The specified file '{}' does not exist",file);
42
+
CommandError::PathNotExist(path) => {
43
+
let msg = format!("The specified path '{}' does not exist",path);
43
44
write!(f,"{}", msg)
44
45
}
45
46
CommandError::InvalidUrl => {
46
-
write!(f,"The provided URL is invalid. Please ensure the URL is correctly formatted,\nincluding the scheme (e.g. 'http://', 'https://').\nFor example: https://www.example.com")
47
+
write!(f,"The provided URL is invalid. Please ensure the URL is correctly formatted,\nincluding the scheme (e.g. 'http://', 'https://').\nFor example: https://example.com")
0 commit comments