1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

dedent lists

this indentation is unnecessary and probably an artefact from the
migration off XML.
This commit is contained in:
Valentin Gagarin 2024-06-18 11:26:08 +02:00
parent 4f340213bb
commit b975151c09
17 changed files with 523 additions and 524 deletions

View file

@ -29,65 +29,65 @@ md5sum`.
# Options
- `--flat`
- `--flat`
Print the cryptographic hash of the contents of each regular file *path*.
That is, instead of computing
the hash of the [Nix Archive (NAR)](@docroot@/store/file-system-object/content-address.md#serial-nix-archive) of *path*,
just [directly hash]((@docroot@/store/file-system-object/content-address.md#serial-flat) *path* as is.
This requires *path* to resolve to a regular file rather than directory.
The result is identical to that produced by the GNU commands
`md5sum` and `sha1sum`.
Print the cryptographic hash of the contents of each regular file *path*.
That is, instead of computing
the hash of the [Nix Archive (NAR)](@docroot@/store/file-system-object/content-address.md#serial-nix-archive) of *path*,
just [directly hash]((@docroot@/store/file-system-object/content-address.md#serial-flat) *path* as is.
This requires *path* to resolve to a regular file rather than directory.
The result is identical to that produced by the GNU commands
`md5sum` and `sha1sum`.
- `--base16`
- `--base16`
Print the hash in a hexadecimal representation (default).
Print the hash in a hexadecimal representation (default).
- `--base32`
- `--base32`
Print the hash in a base-32 representation rather than hexadecimal.
This base-32 representation is more compact and can be used in Nix
expressions (such as in calls to `fetchurl`).
Print the hash in a base-32 representation rather than hexadecimal.
This base-32 representation is more compact and can be used in Nix
expressions (such as in calls to `fetchurl`).
- `--base64`
- `--base64`
Similar to --base32, but print the hash in a base-64 representation,
which is more compact than the base-32 one.
Similar to --base32, but print the hash in a base-64 representation,
which is more compact than the base-32 one.
- `--sri`
- `--sri`
Print the hash in SRI format with base-64 encoding.
The type of hash algorithm will be prepended to the hash string,
followed by a hyphen (-) and the base-64 hash body.
Print the hash in SRI format with base-64 encoding.
The type of hash algorithm will be prepended to the hash string,
followed by a hyphen (-) and the base-64 hash body.
- `--truncate`
- `--truncate`
Truncate hashes longer than 160 bits (such as SHA-256) to 160 bits.
Truncate hashes longer than 160 bits (such as SHA-256) to 160 bits.
- `--type` *hashAlgo*
- `--type` *hashAlgo*
Use the specified cryptographic hash algorithm, which can be one of
`md5`, `sha1`, `sha256`, and `sha512`.
Use the specified cryptographic hash algorithm, which can be one of
`md5`, `sha1`, `sha256`, and `sha512`.
- `--to-base16`
- `--to-base16`
Dont hash anything, but convert the base-32 hash representation
*hash* to hexadecimal.
Dont hash anything, but convert the base-32 hash representation
*hash* to hexadecimal.
- `--to-base32`
- `--to-base32`
Dont hash anything, but convert the hexadecimal hash representation
*hash* to base-32.
Dont hash anything, but convert the hexadecimal hash representation
*hash* to base-32.
- `--to-base64`
- `--to-base64`
Dont hash anything, but convert the hexadecimal hash representation
*hash* to base-64.
Dont hash anything, but convert the hexadecimal hash representation
*hash* to base-64.
- `--to-sri`
- `--to-sri`
Dont hash anything, but convert the hexadecimal hash representation
*hash* to SRI.
Dont hash anything, but convert the hexadecimal hash representation
*hash* to SRI.
# Examples