base64Decode() Query Function

This function performs Base64 decoding of a field. When decoding, characters outside the base encoding alphabet are ignored. The decoded value is subsequently decoded as binary representation of a string according to the charset parameter, which defaults to UTF-8. To work with actual binary data, use ISO-8859-1 charset.

Parameters

Name

Type

Required

Default

Description

field

string

Yes

The field for which to compute decoded Base64 values.

as

string

No

_base64Decode

Name of field in which to store the decoded value.

charset

string

No

UTF-8

The charset to use when transforming bytes to string. Valid charsets are ISO-8859-1, and UTF-8. Validated type is java.nio.charset.Charset.

The implied parameter is field.

Examples

Decode the base64 value in encoded and stores it in decoded:

humio
decoded := base64Decode(encoded)