Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

HashString Function

Overview

The HashString function creates a hash or code for a specified string.

Syntax/Parameters

Syntax

int = HashString ( string data, [int seed] );

Parameters

data

A string.

seed

An optional 16-bit int seed value (or starting value). Values over 1,048,575 are truncated.

Return Value

Returns a int containing a hash code.

Remarks

Resulting codes can be used for a variety of purposes from data grouping to validation. By their very nature, hash codes can not be reversed back into the source string. The HashString function uses the DJB2 algorithm. The hash value will always be 16-bits (a maximum value of 65,535).

This function abides by the Secure Memory Model.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic