PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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
HashCheckFile (Function)
In french: HashVérifieFichier
Checks the Hash of a file for a specific type of algorithm. You have the ability to check:
  • 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
PHP This function is now available for PHP sites.
New in version 15
PHP This function is now available for PHP sites.
PHP This function is now available for PHP sites.
Example
WEBDEV - Server codeAjax
// Calculate the Hash of the "C:\Temp\File.txt" file
HashMyFile is string
HashMyFile = HashFile(HA_MD5_128, "C:\Temp\File.txt")

// Process on the file
// ...

// Checks whether the file was modified
IF HashCheckFile(HA_MD5_128, "C:\Temp\File.txt", ...
HashMyFile) = False THEN
Info("The file was modified.")
END
Syntax

Checking a simple hash Hide the details

<Result> = HashCheckFile(<Type of algorithm> , <File path> , <Hash>)
<Result>: Boolean
  • True if the result when <File path> was hashed by <Type of algorithm> corresponds to <Hash>,
  • False otherwise.
<Type of algorithm>: Integer constant
Indicates the type of algorithm used when hashing the <File path> file:
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
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
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
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
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
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
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
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
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
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
SHA familyHA_SHA_160 (also called SHA-1)
HA_SHA_256
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
PHP Not available.
New in version 23
HA_SHA3_224
PHP Not available.
HA_SHA3_224
PHP Not available.
Versions 23 and later
HA_SHA3_256
PHP Not available.
New in version 23
HA_SHA3_256
PHP Not available.
HA_SHA3_256
PHP Not available.
Versions 23 and later
HA_SHA3_384
PHP Not available.
New in version 23
HA_SHA3_384
PHP Not available.
HA_SHA3_384
PHP Not available.
Versions 23 and later
HA_SHA3_512
PHP Not available.
New in version 23
HA_SHA3_512
PHP Not available.
HA_SHA3_512
PHP Not available.
RIPEMD familyHA_RIPEMD_128
HA_RIPEMD_160
TIGER familyHA_TIGER_128
PHP Not available.
HA_TIGER_160
PHP Not available.
HA_TIGER_192
PHP Not available.
WHIRLPOOL familyHA_WHIRLPOOL
CKSUM familyHA_CKSUM_8
HA_CKSUM_16
HA_CKSUM_32
HA_CKSUM_64
  • 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).
    PHP The TIGER algorithms are not available.
  • 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 for which the Hash will be checked.
<Hash>: Character string (with quotes)
Hash of file to check. This Hash must be the result of HashFile previously called for <File path> on <Type of algorithm>.

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

<Result> = HashCheckFile(<Type of algorithm> , <File path> , <Hash> , <Secret key>)
<Result>: Boolean
  • True if the result when <File path> was hashed by <Type of algorithm> corresponds to <Hash>,
  • False otherwise.
<Type of algorithm>: Integer constant
Indicates the type of HMAC algorithm used when hashing the <File path> file:
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
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
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
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
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
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
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
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
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
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
SHA familyHA_HMAC_SHA_160
HA_HMAC_SHA_256
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
PHP Not available.
New in version 23
HA_SHA3_224
PHP Not available.
HA_SHA3_224
PHP Not available.
Versions 23 and later
HA_SHA3_256
PHP Not available.
New in version 23
HA_SHA3_256
PHP Not available.
HA_SHA3_256
PHP Not available.
Versions 23 and later
HA_SHA3_384
PHP Not available.
New in version 23
HA_SHA3_384
PHP Not available.
HA_SHA3_384
PHP Not available.
Versions 23 and later
HA_SHA3_512
PHP Not available.
New in version 23
HA_SHA3_512
PHP Not available.
HA_SHA3_512
PHP Not available.
RIPEMD familyHA_HMAC_RIPEMD_128
HA_HMAC_RIPEMD_160
TIGER familyHA_HMAC_TIGER_128
PHP Not available.
HA_HMAC_TIGER_160
PHP Not available.
HA_HMAC_TIGER_192
PHP Not available.
WHIRLPOOL familyHA_HMAC_WHIRLPOOL
  • 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).
    PHP The TIGER algorithms are not available.
  • 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 for which the Hash will be checked.
<Hash>: Character string (with quotes)
Hash of file to check. This Hash must be the result of HashFile previously called for <File path> on <Type of algorithm>.
<Secret key>: Character string (between quotes) or Integer
Authentication key of message. This key must be identical to the one used to calculate the Hash.
Remarks

Availability of algorithms

PHP
  • The available algorithms depend on the configuration of PHP server.
  • The TIGER algorithms are not available.The SHA-3 algorithms are not available.
Component : wd240com.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment