Changeset 21918 in vbox
- Timestamp:
- Jul 31, 2009 3:42:31 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/md5.h
r20374 r21918 57 57 58 58 /** 59 * Compute the MD5 hash of the data. 60 * 61 * @param pvBuf Pointer to data. 62 * @param cbBuf Length of data (in bytes). 63 * @param pabDigest Where to store the hash. 64 * (What's passed is a pointer to the caller's buffer.) 65 */ 66 RTDECL(void) RTMd5(const void *pvBuf, size_t cbBuf, uint8_t pabDigest[RTMD5HASHSIZE]); 67 68 /** 59 69 * Initialize MD5 context. 60 70 * … … 75 85 * Compute the MD5 hash of the data. 76 86 * 77 * @param pabDigest Where to store the hash.78 * (What's passed is a pointer to the caller's buffer.)79 * @param pCtx Pointer to the MD5 context.87 * @param pabDigest Where to store the hash. 88 * (What's passed is a pointer to the caller's buffer.) 89 * @param pCtx Pointer to the MD5 context. 80 90 */ 81 91 RTDECL(void) RTMd5Final(uint8_t pabDigest[RTMD5HASHSIZE], PRTMD5CONTEXT pCtx); … … 85 95 /** @} */ 86 96 87 #endif /* !__iprt_md5_h__ */ 97 #endif 98 -
trunk/src/VBox/Runtime/common/checksum/md5.cpp
r21337 r21918 205 205 } 206 206 RT_EXPORT_SYMBOL(RTMd5Final); 207 208 209 RTDECL(void) RTMd5(const void *pvBuf, size_t cbBuf, uint8_t pabDigest[RTMD5HASHSIZE]) 210 { 211 RTMD5CONTEXT Ctx; 212 RTMd5Init(&Ctx); 213 RTMd5Update(&Ctx, pvBuf, cbBuf); 214 RTMd5Final(pabDigest, &Ctx); 215 } 216 RT_EXPORT_SYMBOL(RTMd5); 207 217 208 218 … … 306 316 buf[3] += d; 307 317 } 318 319 320
Note:
See TracChangeset
for help on using the changeset viewer.