Fortinet white logo
Fortinet white logo

Script Reference Guide

EVP_Digest(alg, str)

EVP_Digest(alg, str)

Performs one-shot digest calculation using the specified algorithm.

Syntax

EVP_Digest(alg, str);

Arguments

Name Description

alg

A string to specify the type of hashing algorithms to use, must be MD5, SHA1, SHA256, SHA384, SHA512.

str

A string which will be EVP_Digested.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
alg = "MD5"; -- or "SHA1", "SHA256", "SHA384", "SHA512"
data = "your data"
re = EVP_Digest(alg, data);
debug("the digest in hex is %s\n", to_HEX(re));
}

Supported Version

FortiADC version 5.2.x and later.

EVP_Digest(alg, str)

EVP_Digest(alg, str)

Performs one-shot digest calculation using the specified algorithm.

Syntax

EVP_Digest(alg, str);

Arguments

Name Description

alg

A string to specify the type of hashing algorithms to use, must be MD5, SHA1, SHA256, SHA384, SHA512.

str

A string which will be EVP_Digested.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
alg = "MD5"; -- or "SHA1", "SHA256", "SHA384", "SHA512"
data = "your data"
re = EVP_Digest(alg, data);
debug("the digest in hex is %s\n", to_HEX(re));
}

Supported Version

FortiADC version 5.2.x and later.