Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

HASH-STRING( ) Encrypt expression as string

&pagelevel(3)&pagelevel

Domain: Conversion functions

The HASH-STRING( ) function converts a string expression to a string with a binary content with any required length (e.g. a password). The algorithm which is used has a high probability of returning different output values for different input strings.

Format

HASH-STRING( )

STRING = string_expression

,LENGTH = 4 / arithm_expression

Result type

STRING

Input parameters

STRING = string_expression_1..256
Designates the input string.

LENGTH = 4 / arithm_expression_1..256
Designates the length of the output string.

Result

String

Error messages

SDP0455     INVALID LENGTH OF INPUT STRING (ALLOWED : 1..256)
SDP0456     LENGTH PARAMETER IS OUT OF RANGE (ALLOWED : 1..256) 

Example

/A = HASH-STRING(STRING='AB',LENGTH=2)
/SHOW-VAR A, INFORMATION = *PARAMETERS(VALUE=*X-LITERAL)
A = X'8C5E'