Changeset 29778 in vbox for trunk/src/VBox
- Timestamp:
- May 25, 2010 11:56:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/checksum/RTSha1Digest.cpp
r28800 r29778 36 36 #include <iprt/stream.h> 37 37 #include <iprt/string.h> 38 #include <iprt/mem.h> 38 39 39 40 #include <openssl/sha.h> … … 89 90 return VERR_INTERNAL_ERROR; 90 91 91 int cch = RTStrAPrintf(ppszDigest, "%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x", 92 auchDig[0] , auchDig[1] , auchDig[2] , auchDig[3] , auchDig[4], 93 auchDig[5] , auchDig[6] , auchDig[7] , auchDig[8] , auchDig[9], 94 auchDig[10], auchDig[11], auchDig[12], auchDig[13], auchDig[14], 95 auchDig[15], auchDig[16], auchDig[17], auchDig[18], auchDig[19]); 96 if (RT_UNLIKELY(cch == -1)) 97 rc = VERR_INTERNAL_ERROR; 92 *ppszDigest = (char*)RTMemAlloc(41); 93 rc = RTSha1ToString(auchDig, *ppszDigest, 41); 94 if (RT_FAILURE(rc)) 95 RTStrFree(*ppszDigest); 98 96 99 97 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.