ComputeHash (Str, Key)

Name

ComputeHash

Syntax

ComputeHash (String str, String key)

Purpose

To return a hashed representation of a given string using a specified key.

Description

Returns (A base 64 encoded value) a hashed representation of a given string using a key.

Return Type

String

Parameters

str [System.String] – The raw string to use as the input

key [System.String] – The secret random key used to compute the hash

Example

In this example, we are passing the required parameters to the function transformation object using a Variables object.

Where,

str = Hello World!

key = 0x95A1F27B384C3B50

Note: Random keys can be used for generating unique hashes, such as in hash tables.

Right-click on the function transformation object and select Preview Output. You can see that Astera has returned the hashed value of the specified string, using the specified key value.

Last updated

© Copyright 2023, Astera Software