encode base64 for hash

Encode a string or binary value using Base64.

Signature

> encode 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'

Parameters

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

Input/output types:

inputoutput
binarystring
list<any>list<string>
list<binary>list<string>
list<string>list<string>
recordrecord
stringstring
tabletable

Examples

Encode binary data

> 0x[09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0] | encode base64
CfkRAp1041vYQVbFY1aIwA==

Encode a string with default settings

> 'Some Data' | encode base64
U29tZSBEYXRh

Encode a string with the binhex character set

> 'Some Data' | encode base64 --character-set binhex
7epXB5"%A@4J