W3cubDocs

/Nushell

decode base64 for hash

Base64 decode a value.

Signature

> decode base64 {flags} ...rest

Flags

  • --character-set, -c {string}: specify the character rules for encoding the input. Valid values are 'standard', 'standard-no-padding', 'url-safe', 'url-safe-no-padding','binhex', 'bcrypt', 'crypt', 'mutf7'
  • --binary, -b: Output a binary value instead of decoding payload as UTF-8

Parameters

  • ...rest: For a data structure input, decode data at the given cell paths

Input/output types:

input output
list<string> list<string>
record record
string string
table table

Examples

Base64 decode a value and output as UTF-8 string

>'U29tZSBEYXRh'|decode base64
SomeData

Base64 decode a value and output as binary

>'U29tZSBEYXRh'|decode base64--binary
Length:9 (0x9) bytes|printablewhitespaceascii_othernon_ascii
00000000:536f6d652044617461SomeData

Notes

Will attempt to decode binary payload as an UTF-8 string by default. Use the --binary(-b) argument to force binary output.

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