Fortinet white logo
Fortinet white logo

Script Reference Guide

Sha256_hex(str)

Sha256_hex(str)

Calculates the SHA-256 of a string input and outputs the result in an intermediate variable. In some cases you need a version to deal with it.

Syntax

Sha256_hex(str);

Arguments

Name Description

str

The string which will be calculated.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
str1 = “abc”
sha256 = sha256_hex(str)
}

Supported Version

FortiADC version 4.8.x and later.

Sha256_hex(str)

Sha256_hex(str)

Calculates the SHA-256 of a string input and outputs the result in an intermediate variable. In some cases you need a version to deal with it.

Syntax

Sha256_hex(str);

Arguments

Name Description

str

The string which will be calculated.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
str1 = “abc”
sha256 = sha256_hex(str)
}

Supported Version

FortiADC version 4.8.x and later.