- Timestamp:
- Oct 4, 2013 1:42:42 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 89537
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/zip/xarvfs.cpp
r48844 r48868 469 469 static int rtZipXarParseChecksumStyle(const char *pszStyle, uint8_t *puHashFunction) 470 470 { 471 if (!strcmp(pszStyle, "sha1")) 471 size_t cchStyle = strlen(pszStyle); 472 if ( cchStyle == 4 473 && (pszStyle[0] == 's' || pszStyle[0] == 'S') 474 && (pszStyle[1] == 'h' || pszStyle[1] == 'H') 475 && (pszStyle[2] == 'a' || pszStyle[2] == 'A') 476 && pszStyle[3] == '1' ) 472 477 *puHashFunction = XAR_HASH_SHA1; 473 else if (!strcmp(pszStyle, "md5")) 478 else if ( cchStyle == 3 479 && (pszStyle[0] == 'm' || pszStyle[0] == 'M') 480 && (pszStyle[1] == 'd' || pszStyle[1] == 'D') 481 && pszStyle[2] == '5' ) 474 482 *puHashFunction = XAR_HASH_MD5; 475 else if (!strcmp(pszStyle, "none")) 483 else if ( cchStyle == 4 484 && (pszStyle[0] == 'n' || pszStyle[0] == 'N') 485 && (pszStyle[1] == 'o' || pszStyle[1] == 'O') 486 && (pszStyle[2] == 'n' || pszStyle[2] == 'N') 487 && (pszStyle[3] == 'e' || pszStyle[3] == 'E') ) 476 488 *puHashFunction = XAR_HASH_NONE; 477 489 else
Note:
See TracChangeset
for help on using the changeset viewer.