|
本帖最后由 咏恒ぃ☆吣 于 2017-10-29 23:16 编辑
https://bbs.125.la/thread-13950841-1-1.html
这个帖子出现的内存泄露我觉的是这里出现问题了 [e=2 ].版本 2 |
MD过程 | 文本型 | | |
校验数据 | 字节集 | | | | 种类 | 整数型 | | | | 长度 | 整数型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | hCryptProv | 整数型 | | | hKey | 整数型 | | | hHash | 整数型 | | | pbBuffer | 字节集 | | | cbHash | 整数型 | | | rgbHash | 字节集 | | | rgbDigits | 字节集 | | | 局_MD5 | 字节集 | | | b | 整数型 | | | i | 整数型 | | | len | 整数型 | | | 如果真 (CryptAcquireContextA (hCryptProv, “”, “”, 1, -268435456 ) = 0 )如果真 (CryptAcquireContextA (hCryptProv, “”, “”, 1, 0 ) = 0 )CryptReleaseContext (hCryptProv, 0 ) 返回 (“”)如果 (CryptCreateHash (hCryptProv, 种类, hKey, 0, hHash ) = 0 )CryptDestroyKey (hKey ) CryptReleaseContext (hCryptProv, 0 )返回 (“”)pbBuffer = 校验数据 len = 取字节集长度 (校验数据 )如果 (CryptHashData (hHash, pbBuffer, len, 0 ) = 0 )CryptDestroyKey (hKey ) CryptDestroyHash (hHash )CryptReleaseContext (hCryptProv, 0 )返回 (“”)rgbHash = 取空白字节集 (长度 )cbHash = 长度 如果 (CryptGetHashParam (hHash, 2, rgbHash, cbHash, 0 ) = 0 )CryptDestroyKey (hKey ); CryptDestroyHash (hHash )CryptReleaseContext (hCryptProv, 0 )返回 (“”)rgbDigits = 到字节集 (“0123456789ABCDEF”)局_MD5 = 取空白字节集 (长度 × 2 )变量循环首 (0, cbHash - 1, 1, i )b = rgbHash [i + 1 ]局_MD5 [i × 2 + 1 ] = rgbDigits [右移 (b, 4 ) + 1 ]局_MD5 [i × 2 + 2 ] = rgbDigits [位与 (b, 15 ) + 1 ]变量循环尾 ()CryptDestroyKey (hKey ) CryptDestroyHash (hHash )CryptReleaseContext (hCryptProv, 0 )返回 (到文本 (局_MD5)) |
|