SHA256

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Cryptography >

SHA256

 

Description

 

Calculate a binary hash value giving a text

 

Syntax

 

s = SHA256(sTextToHash [, ReturnType])

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

sTextToHash

String

No

Text message to be hashed

ReturnType

String

Yes

Optional value indicating the kind of return value.

 

If nothing is indicated, SHA256 binary string will be returned

 

Otherwise use one of the following value:

%SHA256_Bin

will return binary string

%SHA256_HexL

will return HEX lower string

%SHA256_HexU

will return HEX UPPER string

%SHA256_Base64

will return Base64 encoded string of the binary data

 

Hex conversion will convert considering binary string as a sequence of 8 single DWORD chunks: 32 bits x 8 DWORD = 256 bits





 

Remarks

 

Additional info: https://en.wikipedia.org/wiki/SHA-2

 

Restrictions

 

See also

 

Examples