Any questions? Ask us:




EP_CryptHashBuffer calculates hash of the user defined buffer.


  • 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
  • Buffer - a pointer to the memory buffer for hash calculating.
  • Size - the size of the memory buffer.
  • 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


The function fails in the following cases:

  • the input buffer is not allocated;
  • the input buffer is not readable;
  • Digest buffer is not allocated;
  • Digest buffer is write protected;
  • the application is not protected.


Show/Hide C++ function definition

extern "C" __declspec( dllimport ) __stdcall int EP_CryptHashBuffer( int Hash, byte* Buffer, int Size, byte* Digest);

Show/Hide Delphi function definition

Show/Hide C# (.NET) function definition

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