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
Makes a determination if a file meets an expected checksum signature.
28
+
This function is usually used when comparing a file that is downloaded from an official distribution point.
29
+
If the checksum fails to match the expected output, this function throws an error.
30
+
31
+
Checksums have been used for years as a means of verification. A checksum hash is a unique value or signature that corresponds to the contents of a file.
32
+
File names and extensions can be altered without changing the checksum signature.
33
+
However if you changed the contents of the file, even one character, the checksum will be different.
34
+
35
+
Checksums are used to provide as a means of cryptographically ensuring the contents of a file have not been changed.
36
+
While some cryptographic algorithms, including MD5 and SHA1, are no longer considered secure against attack, the goal of a checksum algorithm is to make it extremely difficult (near impossible with better algorithms) to alter the contents of a file (whether by accident or for malicious reasons) and still result in the same checksum signature.
37
+
38
+
When verifying a checksum using a secure algorithm, if the checksum matches the expected signature, the contents of the file are identical to what is expected.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
128
131
129
132
## INPUTS
130
133
131
-
### System.Object[]
132
-
133
134
## OUTPUTS
134
135
135
-
### System.Object
136
136
## NOTES
137
+
This uses the checksum.exe tool available separately at https://community.chocolatey.org/packages/checksum.
138
+
139
+
Chocolatey CLI options that affect checksum verification:
140
+
141
+
- `--ignore-checksums`- skips checksumming
142
+
- `--allow-empty-checksums`- skips checksumming when the package is missing a checksum
143
+
- `--allow-empty-checksums-secure`- skips checksumming when the package is missing a checksum for secure (HTTPS) locations
144
+
- `--require-checksums`- requires checksums for both non-secure and secure locations
145
+
- `--download-checksum`, `--download-checksum-type` - allows user to pass their own checksums
146
+
- `--download-checksum-x64`, `--download-checksum-type-x64` - allows user to pass their own checksums
147
+
148
+
Chocolatey CLI features that affect checksum verification:
149
+
150
+
- `checksumFiles`- when turned off, skips checksumming
151
+
- `allowEmptyChecksums`- when turned on, skips checksumming when the package is missing a checksum
152
+
- `allowEmptyChecksumsSecure`- when turned on, skips checksumming when the package is missing a checksum for secure (HTTPS) locations
153
+
154
+
This command is also aliased to `Get-ChecksumValid` for compatibility with packages designed for Chocolatey CLI v2.x and earlier.
0 commit comments