buffer_md5(buffer, offset, size);
|buffer||The index of the buffer to use.|
|偏移||The data offset value.|
|大小||The size of the buffer.|
在密码学中，MD5（Message-Digest algorithm 5，消息摘要算法 5）是广泛使用的具有 128 位散列值的加密散列函数，并且已经在各种安全应用程序中使用。 It is also commonly used to check the integrity of data. This function will take the input data from a given buffer (or part of the buffer) and return the 32-character hexadecimal MD5 hash that is unique to that data. In this way you can generate a secure key which can be stored and used to check the integrity of the information being sent to (or received from) an external server (for example). When applying this to buffers using this function you must specify the buffer id of the buffer to use, then an offset value (in bytes) for where to begin, and then a size (again in bytes) for the region to be hashed.
check_string = buffer_md5(buff, 0, buffer_get_size(buff));
The above code will create an md5 hash for the full data stored in the buffer indexed by the variable "buff", and store the returned hash in the variable "check_string".