Fortinet white logo
Fortinet white logo

Script Reference Guide

B64_enc(str)

B64_enc(str)

Encodes a string input in Base64 and outputs the result in string format.

Syntax

B64_enc(str);

Arguments

Name Description

str

The string which will be calculated.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
result = b64_enc(input);
--Input can be general format:
str=”test string”
a=12
en=b64_enc(“%s, 123 %d”, str, a);
}

Supported Version

FortiADC version 5.2.x and later.

B64_enc(str)

B64_enc(str)

Encodes a string input in Base64 and outputs the result in string format.

Syntax

B64_enc(str);

Arguments

Name Description

str

The string which will be calculated.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
result = b64_enc(input);
--Input can be general format:
str=”test string”
a=12
en=b64_enc(“%s, 123 %d”, str, a);
}

Supported Version

FortiADC version 5.2.x and later.