hash sha512 for hash
Hash a value using the sha512 hash algorithm.
Command Type
built-in
Signature
> hash sha512 {flags} ...rest
Flags
--binary, -b: Output binary instead of hexadecimal representation.
Parameters
...rest: Optionally sha512 hash data by cell path.
Input/output types:
| input | output |
|---|---|
| string | oneof<string, binary> |
| binary | oneof<string, binary> |
| list<string> | list<oneof<string, binary>> |
| list<binary> | list<oneof<string, binary>> |
| table | table |
| record | record |
Examples
Return the sha512 hash of a string, hex-encoded
> 'abcdefghijklmnopqrstuvwxyz' | hash sha512
4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1Return the sha512 hash of a string, as binary
> 'abcdefghijklmnopqrstuvwxyz' | hash sha512 --binary
Length: 64 (0x40) bytes | null_char printable whitespace ascii_other non_ascii
00000000: 4d bf f8 6c c2 ca 1b ae 1e 16 46 8a 05 cb 98 81 M××l×וו•Fו×××
00000010: c9 7f 17 53 bc e3 61 90 34 89 8f aa 1a ab e4 29 ו•S××a×4××ו××)
00000020: 95 5a 1b f8 ec 48 3d 74 21 fe 3c 16 46 61 3a 59 ×Z•××H=t!×<•Fa:Y
00000030: ed 54 41 fb 0f 32 13 89 f7 7f 48 a8 79 c7 b1 f1 ×TAו2•×וH×y×××Return the sha512 hash of binary data
> 0x[deadbeef] | hash sha512Return the sha512 hash of a file's contents
> open ./nu_0_24_1_windows.zip | hash sha512Return the sha512 hash of a list of strings
> [abc def ghi] | hash sha512
╭───┬────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 0 │ ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d44 │
│ │ 23643ce80e2a9ac94fa54ca49f │
│ 1 │ 40a855bf0a93c1019d75dd5b59cd8157608811dd75c5977e07f3bc4be0cad98b22dde4db9ddb429fc2ad3cf9ca379fedf6c1dc │
│ │ 4d4bb8829f10c2f0ee04a66663 │
│ 2 │ 366aead3bed29b6d1de2b8d211e791e5dc7a9611b3d4c61c9323128d746e670a69e9690ce5620efc3b36f6d1b655ce36a72a2f │
│ │ bed4927448b668f1e3f341c0d9 │
╰───┴────────────────────────────────────────────────────────────────────────────────────────────────────────╯