PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

  • Notes
  • Availability of algorithms
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Calculates the Hash of a file according to a specific algorithm. You have the ability to calculate:
  • a simple hash.
  • a hash with message authentication.
Reminder: The hashing is used to summarize a file or a character string. This summary is called Hash.
Versions 15 and later
Java This function is now available for Java applications.
New in version 15
Java This function is now available for Java applications.
Java This function is now available for Java applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVUser code (UMC)
// Calculate the Hash of two files
Hash1 is Buffer = HashFile(HA_MD5_128, "C:\My files\FileA.txt")
Hash2 is Buffer = HashFile(HA_MD5_128, "D:\My files\FileB.txt")
// Compare the two Hash
IF Hash1 = Hash2 THEN Info("The two files are identical.")
Syntax

Calculating a simple hash Hide the details

<Result> = HashFile(<Type of algorithm> , <File path> [, <Progress Bar>])
<Result>: Buffer
Result of <File path> hashing with the <Type of algorithm> algorithm.
Caution: This result may contain non-displayable characters.
<Type of algorithm>: Integer constant
Indicates the type of algorithm used when hashing the <File path> file:
Versions 25 and later
MD4 family
New in version 25
MD4 family
MD4 family
Versions 25 and later
HA_MD4
Java Not available.
New in version 25
HA_MD4
Java Not available.
HA_MD4
Java Not available.
MD5 familyHA_MD5_128
Versions 24 and later
MURMUR family
New in version 24
MURMUR family
MURMUR family
Versions 24 and later
HA_MURMUR_1: Murmur algorithm version 1: 32-bit hash result
New in version 24
HA_MURMUR_1: Murmur algorithm version 1: 32-bit hash result
HA_MURMUR_1: Murmur algorithm version 1: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2: Murmur algorithm version 2: 32-bit hash result
New in version 24
HA_MURMUR_2: Murmur algorithm version 2: 32-bit hash result
HA_MURMUR_2: Murmur algorithm version 2: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_64A: Murmur algorithm version 2: 64-bit hash result optimized for 64-bit processors
New in version 24
HA_MURMUR_2_64A: Murmur algorithm version 2: 64-bit hash result optimized for 64-bit processors
HA_MURMUR_2_64A: Murmur algorithm version 2: 64-bit hash result optimized for 64-bit processors
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_64B: Murmur algorithm version 2: 64-bit hash result optimized for 32-bit processors
New in version 24
HA_MURMUR_2_64B: Murmur algorithm version 2: 64-bit hash result optimized for 32-bit processors
HA_MURMUR_2_64B: Murmur algorithm version 2: 64-bit hash result optimized for 32-bit processors
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_A: Incremental Murmur algorithm version 2: 32-bit hash result
New in version 24
HA_MURMUR_2_A: Incremental Murmur algorithm version 2: 32-bit hash result
HA_MURMUR_2_A: Incremental Murmur algorithm version 2: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_BIG_ENDIAN: Murmur algorithm version 2 for big-endian machine: 32-bit hash result
New in version 24
HA_MURMUR_2_BIG_ENDIAN: Murmur algorithm version 2 for big-endian machine: 32-bit hash result
HA_MURMUR_2_BIG_ENDIAN: Murmur algorithm version 2 for big-endian machine: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_ALIGNED: Murmur algorithm version 2 for aligned machine: 32-bit hash result
New in version 24
HA_MURMUR_2_ALIGNED: Murmur algorithm version 2 for aligned machine: 32-bit hash result
HA_MURMUR_2_ALIGNED: Murmur algorithm version 2 for aligned machine: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_3_32: Murmur algorithm version 3: 32-bit hash result
New in version 24
HA_MURMUR_3_32: Murmur algorithm version 3: 32-bit hash result
HA_MURMUR_3_32: Murmur algorithm version 3: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_3_128_X86: Murmur algorithm version 3: 128-bit hash result optimized for 32-bit processors
New in version 24
HA_MURMUR_3_128_X86: Murmur algorithm version 3: 128-bit hash result optimized for 32-bit processors
HA_MURMUR_3_128_X86: Murmur algorithm version 3: 128-bit hash result optimized for 32-bit processors
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_3_128_X64: Murmur algorithm version 3: 128-bit hash result optimized for 64-bit processors
New in version 24
HA_MURMUR_3_128_X64: Murmur algorithm version 3: 128-bit hash result optimized for 64-bit processors
HA_MURMUR_3_128_X64: Murmur algorithm version 3: 128-bit hash result optimized for 64-bit processors
Java Not available.
Java Not available.
RIPEMD familyHA_RIPEMD_128
Java Not available.
HA_RIPEMD_160
Java Not available.
SHA familyHA_SHA_160 (also called SHA-1)
HA_SHA_256
Versions 25 and later
HA_SHA_256_DOUBLE
New in version 25
HA_SHA_256_DOUBLE
HA_SHA_256_DOUBLE
HA_SHA_384
HA_SHA_512
Versions 23 and later
SHA-3 family
New in version 23
SHA-3 family
SHA-3 family
Versions 23 and later
HA_SHA3_224
New in version 23
HA_SHA3_224
HA_SHA3_224
Java Not available.
Java Not available.
Versions 23 and later
HA_SHA3_256
New in version 23
HA_SHA3_256
HA_SHA3_256
Java Not available.
Java Not available.
Versions 23 and later
HA_SHA3_384
New in version 23
HA_SHA3_384
HA_SHA3_384
Java Not available.
Java Not available.
Versions 23 and later
HA_SHA3_512
New in version 23
HA_SHA3_512
HA_SHA3_512
Java Not available.
Java Not available.
TIGER familyHA_TIGER_128
Java Not available.
Java Not available.
HA_TIGER_160
Java Not available.
Java Not available.
HA_TIGER_192
Java Not available.
Java Not available.
WHIRLPOOL familyHA_WHIRLPOOL
Java Not available.
CKSUM familyHA_CKSUM_8
Java Not available.
HA_CKSUM_16
Java Not available.
HA_CKSUM_32
Java Not available.
HA_CKSUM_64
Java Not available.
  • MD4 / MD5 / SHA / RIPEMD algorithms: standard cryptographic hash functions.
  • TIGER/WHIRLPOOL algorithms: hash functions with high cryptographic properties optimized for the 64-bit mode (but can also be used in 32-bit mode).
  • CKSUM algorithms: hash functions with no cryptographic property, should be used to perform low-level checks or with hashing tables.
  • Versions 24 and later
    MURMUR algorithm: very fast hashing functions. This algorithm is used by the "bloom filter" of bitcoin wallets.
    New in version 24
    MURMUR algorithm: very fast hashing functions. This algorithm is used by the "bloom filter" of bitcoin wallets.
    MURMUR algorithm: very fast hashing functions. This algorithm is used by the "bloom filter" of bitcoin wallets.
<File path>: Character string (with quotes)
Path of file on which the calculation will be performed.
<Progress Bar>: Optional window name or optional control name
Versions 24 and later
WINDEVUniversal Windows 10 App
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.
New in version 24
WINDEVUniversal Windows 10 App
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.
WINDEVUniversal Windows 10 App
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.

Calculating a hash with message authentication (HMAC/MURMUR algorithm) Hide the details

<Result> = HashFile(<Type of algorithm> , <File path> , <Secret key> [, <Progress Bar>])
<Result>: Buffer
Result of <File path> hashing with the <Type of algorithm> algorithm.
Caution: This result may contain non-displayable characters.
<Type of algorithm>: Integer constant
Indicates the type of HMAC algorithm used when hashing the <File path> file:
Versions 25 and later
MD4 family
New in version 25
MD4 family
MD4 family
Versions 25 and later
HA_HMAC_MD4
Java Not available.
New in version 25
HA_HMAC_MD4
Java Not available.
HA_HMAC_MD4
Java Not available.
MD5 familyHA_HMAC_MD5_128
Versions 24 and later
MURMUR family
New in version 24
MURMUR family
MURMUR family
Versions 24 and later
HA_MURMUR_1: Murmur algorithm version 1: 32-bit hash result
New in version 24
HA_MURMUR_1: Murmur algorithm version 1: 32-bit hash result
HA_MURMUR_1: Murmur algorithm version 1: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2: Murmur algorithm version 2: 32-bit hash result
New in version 24
HA_MURMUR_2: Murmur algorithm version 2: 32-bit hash result
HA_MURMUR_2: Murmur algorithm version 2: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_64A: Murmur algorithm version 2: 64-bit hash result optimized for 64-bit processors
New in version 24
HA_MURMUR_2_64A: Murmur algorithm version 2: 64-bit hash result optimized for 64-bit processors
HA_MURMUR_2_64A: Murmur algorithm version 2: 64-bit hash result optimized for 64-bit processors
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_64B: Murmur algorithm version 2: 64-bit hash result optimized for 32-bit processors
New in version 24
HA_MURMUR_2_64B: Murmur algorithm version 2: 64-bit hash result optimized for 32-bit processors
HA_MURMUR_2_64B: Murmur algorithm version 2: 64-bit hash result optimized for 32-bit processors
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_A: Incremental Murmur algorithm version 2: 32-bit hash result
New in version 24
HA_MURMUR_2_A: Incremental Murmur algorithm version 2: 32-bit hash result
HA_MURMUR_2_A: Incremental Murmur algorithm version 2: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_BIG_ENDIAN: Murmur algorithm version 2 for big-endian machine: 32-bit hash result
New in version 24
HA_MURMUR_2_BIG_ENDIAN: Murmur algorithm version 2 for big-endian machine: 32-bit hash result
HA_MURMUR_2_BIG_ENDIAN: Murmur algorithm version 2 for big-endian machine: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_2_ALIGNED: Murmur algorithm version 2 for aligned machine: 32-bit hash result
New in version 24
HA_MURMUR_2_ALIGNED: Murmur algorithm version 2 for aligned machine: 32-bit hash result
HA_MURMUR_2_ALIGNED: Murmur algorithm version 2 for aligned machine: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_3_32: Murmur algorithm version 3: 32-bit hash result
New in version 24
HA_MURMUR_3_32: Murmur algorithm version 3: 32-bit hash result
HA_MURMUR_3_32: Murmur algorithm version 3: 32-bit hash result
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_3_128_X86: Murmur algorithm version 3: 128-bit hash result optimized for 32-bit processors
New in version 24
HA_MURMUR_3_128_X86: Murmur algorithm version 3: 128-bit hash result optimized for 32-bit processors
HA_MURMUR_3_128_X86: Murmur algorithm version 3: 128-bit hash result optimized for 32-bit processors
Java Not available.
Java Not available.
Versions 24 and later
HA_MURMUR_3_128_X64: Murmur algorithm version 3: 128-bit hash result optimized for 64-bit processors
New in version 24
HA_MURMUR_3_128_X64: Murmur algorithm version 3: 128-bit hash result optimized for 64-bit processors
HA_MURMUR_3_128_X64: Murmur algorithm version 3: 128-bit hash result optimized for 64-bit processors
Java Not available.
Java Not available.
RIPEMD familyHA_HMAC_RIPEMD_128
Java Not available.
HA_HMAC_RIPEMD_160
Java Not available.
SHA familyHA_HMAC_SHA_160
HA_HMAC_SHA_256
Versions 25 and later
HA_HMAC_SHA_256_DOUBLE
New in version 25
HA_HMAC_SHA_256_DOUBLE
HA_HMAC_SHA_256_DOUBLE
HA_HMAC_SHA_384
HA_HMAC_SHA_512
Versions 23 and later
SHA-3 family
New in version 23
SHA-3 family
SHA-3 family
Versions 23 and later
HA_SHA3_224
New in version 23
HA_SHA3_224
HA_SHA3_224
Java Not available.
Java Not available.
Versions 23 and later
HA_SHA3_256
New in version 23
HA_SHA3_256
HA_SHA3_256
Java Not available.
Java Not available.
Versions 23 and later
HA_SHA3_384
New in version 23
HA_SHA3_384
HA_SHA3_384
Java Not available.
Java Not available.
Versions 23 and later
HA_SHA3_512
New in version 23
HA_SHA3_512
HA_SHA3_512
Java Not available.
Java Not available.
TIGER familyHA_HMAC_TIGER_128
Java Not available.
Java Not available.
HA_HMAC_TIGER_160
Java Not available.
Java Not available.
HA_HMAC_TIGER_192
Java Not available.
Java Not available.
WHIRLPOOL familyHA_HMAC_WHIRLPOOL
Java Not available.
  • MD4 / MD5 / SHA / RIPEMD algorithms: standard cryptographic hash functions.
  • TIGER/WHIRLPOOL algorithms: hash functions with high cryptographic properties optimized for the 64-bit mode (but can also be used in 32-bit mode).
  • Versions 24 and later
    MURMUR algorithm: very fast hashing functions. This algorithm is used by the "bloom filter" of bitcoin wallets.
    New in version 24
    MURMUR algorithm: very fast hashing functions. This algorithm is used by the "bloom filter" of bitcoin wallets.
    MURMUR algorithm: very fast hashing functions. This algorithm is used by the "bloom filter" of bitcoin wallets.
<File path>: Character string (with quotes)
Path of file on which the calculation will be performed.
<Secret key>: Character string (between quotes) or Integer
Authentication key of message.
  • If an HMAC algorithm is used, this parameter must be a string.
  • Versions 24 and later
    If a MURMUR algorithm is used, the key must be an integer.
    New in version 24
    If a MURMUR algorithm is used, the key must be an integer.
    If a MURMUR algorithm is used, the key must be an integer.
Java This parameter must not be an empty string.
<Progress Bar>: Optional control name or optional window name
Versions 24 and later
WINDEVUniversal Windows 10 App
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.
New in version 24
WINDEVUniversal Windows 10 App
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.
WINDEVUniversal Windows 10 App
  • Name of window where the progress bar will be displayed,
  • Name of the Progress Bar control to use.
Remarks

Notes

  • Two files with an identical content will have, for the same type of algorithm, two identical Hashes.
  • The result of the Hash may contain non-displayable characters. These characters will not be visible when using Info or Trace for example.

Availability of algorithms

Java Only the following algorithms are supported:
  • HA_MD5_128
  • HA_SHA_160, HA_SHA_256, HA_SHA_384, HA_SHA_512
  • HA_HMAC_MD5_128
  • HA_ HMAC_SHA_160, HA_HMAC_SHA_256, HA_HMAC_SHA_384, HA_SHA_HMAC_512
  • Versions 25 and later
    HA_MD4
    New in version 25
    HA_MD4
    HA_MD4
  • Versions 25 and later
    HA_SHA_256_DOUBLE
    New in version 25
    HA_SHA_256_DOUBLE
    HA_SHA_256_DOUBLE
  • Versions 25 and later
    HA_HMAC_SHA_256_DOUBLE
    New in version 25
    HA_HMAC_SHA_256_DOUBLE
    HA_HMAC_SHA_256_DOUBLE
Related Examples:
The Hash functions Unit examples (WINDEV): The Hash functions
[ + ] Using the hashing functions.
The HashFile and HashString functions are used to calculate a Hash key for a string or for a file.
This Hash key is used to:
- Check whether the file is consistent after a transfer for example
- Find file duplicates
- ...
Business / UI classification : Business Logic
Component : wd250com.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment