Elektra  0.8.19
Plugin: base64

The Base64 Encoding (specified in RFC4648) is used to encode arbitrary binary data to ASCII strings.

This is useful for configuration files that must contain ASCII strings only.

The base64 plugin encodes all binary values before kdb set writes the configuration to the file. The values are decoded back to its original value after kdb get has read from the configuration file.

In order to identify the base64 encoded content, the values are marked with the prefix @BASE64. To distinguish between the @ as character and @ as Base64 marker, all strings starting with @ will be modified so that they begin with @@.

See the documentation of the null plugin, as it uses the same pattern for masking @.

Examples

To mount a simple backend that uses the Base64 encoding, you can use:

kdb mount test.ecf /test base64

All encoded binary values will look something like this:

@BASE64SGVsbG8gV29ybGQhCg==