encode base32hex

For formats.

Encode a binary value or a string using base32hex.

Command Type

built-in

Signature

> encode base32hex {flags}

Flags

  • --nopad: Don’t pad the output.

Input/output types:

input output
string string
binary string

Examples

Encode a binary value

> 0x[57 6E AD] | encode base32hex
ATNAQ===

Encode a string

> "hello there" | encode base32hex
D1IMOR3F41Q6GPBICK======

Don’t apply padding to the output

> "hello there" | encode base32hex --nopad
D1IMOR3F41Q6GPBICK

Notes

This command uses an alternative Base32 alphabet, defined in RFC 4648, section 7.

Note this command will collect stream input.

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.