Any questions? Ask us: support@enigmaprotector.com

Help

Manual
Additional
Manual

EP_CryptHashStringW

EP_CryptHashFileW calculates hash of a user defined UNICODE string.

Parameters

  • Hash - the type of the hash for calculation.

    Hash Type Parameter = Value
    XOR32 HASH_XOR32 = 0
    MD2 HASH_MD2 = 1
    MD5 HASH_MD5 = 2
    RipeMD160 HASH_RipeMD160 = 3
    SH1 HASH_SH1 = 4
    SHA224 HASH_SHA224 = 5
    SHA256 HASH_SHA256 = 6
    SHA384 HASH_SHA384 = 7
    SHA512 HASH_SHA512 = 8
  • Str - a pointer to the null terminated UNICODE string.
  • Digest - a pointer to the buffer for storing the hash value.

Return Value

If the function succeeds, the return value is the size of hash (that is stored in Digest buffer) in bytes. If the function fails, the return value is 0.

Hash Type Hash Size (bytes)
XOR32 4
MD2 16
MD5 16
RipeMD160 20
SH1 20
SHA224 28
SHA256 32
SHA384 48
SHA512 64

Remark

The function fails in the following cases:

  • Str is not set;
  • Digest buffer is not allocated;
  • Digest buffer is write protected;
  • the application is not protected.

Definition

Show/Hide C++ function definition

extern "C" __declspec( dllimport ) __stdcall int EP_CryptHashStringW( int Hash, wchar_t* Str, byte* Digest);

Show/Hide Delphi function definition

Show/Hide C# (.NET) function definition

See function examples in the installation folder, Examples\Hashes subfolder.