Spec-Zone.ru › Nushell

hash sha256 for hash

Hash a value using the sha256 hash algorithm.

Signature

> hash sha256 {flags} ...rest

Flags

  • --binary, -b: Output binary instead of hexadecimal representation.

Parameters

  • ...rest: Optionally sha256 hash data by cell path.

Input/output types:

input output
string oneof<string, binary>
binary oneof<string, binary>
table table
record record

Examples

Return the sha256 hash of a string, hex-encoded

> 'abcdefghijklmnopqrstuvwxyz' | hash sha256
71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73

Return the sha256 hash of a string, as binary

> 'abcdefghijklmnopqrstuvwxyz' | hash sha256 --binary
Length: 32 (0x20) bytes | null_char printable whitespace ascii_other non_ascii
00000000:   71 c4 80 df  93 d6 ae 2f  1e fa d1 44  7c 66 c9 52   q××××××/•××D|f×R
00000010:   5e 31 62 18  cf 51 fc 8d  9e d8 32 f2  da f1 8b 73   ^1b•×Q××××2××××s

Return the sha256 hash of a file's contents

> open ./nu_0_24_1_windows.zip | hash sha256

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/hash_sha256.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API