diff options
| author | doufenghu <[email protected]> | 2024-05-02 17:14:05 +0800 |
|---|---|---|
| committer | doufenghu <[email protected]> | 2024-05-02 17:14:05 +0800 |
| commit | a172d68a345cd1943001533be9209fe04a9d5581 (patch) | |
| tree | 13ad16eb846f5694ef7f37a5888243361d99f37d /docs/processor | |
| parent | 27eb76f576eb0ab4d611cab72cb3fca01eac5cec (diff) | |
[Improve][docs] Add support feature documents from 1.2.1 to 1.3.1
Diffstat (limited to 'docs/processor')
| -rw-r--r-- | docs/processor/udf.md | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/docs/processor/udf.md b/docs/processor/udf.md index 7b69254..5e6bd6a 100644 --- a/docs/processor/udf.md +++ b/docs/processor/udf.md @@ -1,9 +1,10 @@ # UDF -> The functions for projection processor +> The functions for projection processors. ## Function of content - [Asn Lookup](#asn-lookup) - [Base64 Decode](#base64-decode) +- [Base64 Encode](#base64-encode) - [Current Unix Timestamp](#current-unix-timestamp) - [Domain](#domain) - [Drop](#drop) @@ -62,7 +63,7 @@ Example: ### Base64 Decode Base64 decode function is used to decode the base64 encoded string. -```BASE64_DECODE(filter, output_fields[, parameters])``` +```BASE64_DECODE_TO_STRING(filter, output_fields[, parameters])``` - filter: optional - lookup_fields: not required - output_fields: required @@ -72,13 +73,31 @@ Base64 decode function is used to decode the base64 encoded string. Example: ```yaml - - function: BASE64_DECODE + - function: BASE64_DECODE_TO_STRING output_fields: [mail_attachment_name] parameters: value_field: mail_attachment_name charset_field: mail_attachment_name_charset ``` +### Base64 Encode +Base64 encode function is commonly used to encode the binary data to base64 string. Especially when that data need to be stored and transferred over media that are designed to deal with text. This encoding helps to ensure that the data remains intact without modification during transport. + +```BASE64_ENCODE_TO_STRING(filter, output_fields[, parameters])``` +- filter: optional +- lookup_fields: not required +- output_fields: required +- parameters: required + - value_field: `<String>` required. + +Example: +```yaml + - function: BASE64_ENCODE_TO_STRING + output_fields: [packet] + parameters: + value_field: packet +``` + ### Current Unix Timestamp Current unix timestamp function is used to get the current unix timestamp. |
