Lines Matching refs:psz

147                  if (!RTStrICmp(ValueUnion.psz, "crc32"))
152 else if (!RTStrICmp(ValueUnion.psz, "crc64"))
157 else if (!RTStrICmp(ValueUnion.psz, "md2"))
162 else if (!RTStrICmp(ValueUnion.psz, "md5"))
167 else if (!RTStrICmp(ValueUnion.psz, "sha1"))
172 else if (!RTStrICmp(ValueUnion.psz, "sha224"))
177 else if (!RTStrICmp(ValueUnion.psz, "sha256"))
182 else if (!RTStrICmp(ValueUnion.psz, "sha384"))
187 else if (!RTStrICmp(ValueUnion.psz, "sha512"))
192 else if (!RTStrICmp(ValueUnion.psz, "sha512/224"))
197 else if (!RTStrICmp(ValueUnion.psz, "sha512/256"))
204 Error("Invalid digest type: %s\n", ValueUnion.psz);
210 if (!RTStrICmp(ValueUnion.psz, "full"))
212 else if (!RTStrICmp(ValueUnion.psz, "block"))
214 else if (!RTStrICmp(ValueUnion.psz, "file"))
216 else if (!RTStrICmp(ValueUnion.psz, "cvas"))
220 Error("Invalid digest method: %s\n", ValueUnion.psz);
259 int rc = RTSha1DigestFromFile(ValueUnion.psz, &pszDigest, NULL, NULL);
261 return Error("RTSha1Digest(%s,) -> %Rrc\n", ValueUnion.psz, rc);
262 RTPrintf("%s %s\n", pszDigest, ValueUnion.psz);
270 int rc = RTSha256DigestFromFile(ValueUnion.psz, &pszDigest, NULL, NULL);
272 return Error("RTSha256Digest(%s,) -> %Rrc\n", ValueUnion.psz, rc);
273 RTPrintf("%s %s\n", pszDigest, ValueUnion.psz);
285 int rc = RTFileOpen(&hFile, ValueUnion.psz, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
287 return Error("RTFileOpen(,%s,) -> %Rrc\n", ValueUnion.psz, rc);
292 return Error("RTFileSeek(%s,%ull) -> %Rrc\n", ValueUnion.psz, offStart, rc);
422 RTPrintf("Partial: %s %s\n", pszDigest, ValueUnion.psz);
423 return Error("RTFileRead(%s) -> %Rrc\n", ValueUnion.psz, rc);
427 RTPrintf("%s %s\n", pszDigest, ValueUnion.psz);
454 rc = RTStrmOpen(ValueUnion.psz, "r", &pFile);
456 return Error("Failed to open CVAS file '%s': %Rrc", ValueUnion.psz, rc);
463 char *psz;
469 psz = MyGetNextSignificantLine(pFile, s_szLine, sizeof(s_szLine), &iLine, &rc);
470 if (!psz)
474 if (*psz == '[')
479 if (RTStrNICmp(psz, RT_STR_TUPLE("Len =")))
480 return Error("%s(%d): Expected 'Len =' found '%.10s...'", ValueUnion.psz, iLine, psz);
481 psz = RTStrStripL(psz + 5);
482 rc = RTStrToUInt64Full(psz, 0, &cMessageBits);
484 return Error("%s(%d): Error parsing length '%s': %Rrc\n", ValueUnion.psz, iLine, psz, rc);
487 psz = MyGetNextSignificantLine(pFile, s_szLine, sizeof(s_szLine), &iLine, &rc);
488 if (!psz)
489 return Error("%s(%d): Expected message text not EOF.", ValueUnion.psz, iLine);
490 if (RTStrNICmp(psz, RT_STR_TUPLE("Msg =")))
491 return Error("%s(%d): Expected 'Msg =' found '%.10s...'", ValueUnion.psz, iLine, psz);
492 psz = RTStrStripL(psz + 5);
498 rc = RTStrConvertHexBytes(psz, s_abMessage, cbMessage, 0 /*fFlags*/);
501 ValueUnion.psz, iLine, psz, rc);
505 psz = MyGetNextSignificantLine(pFile, s_szLine, sizeof(s_szLine), &iLine, &rc);
506 if (!psz)
507 return Error("%s(%d): Expected message digest not EOF.", ValueUnion.psz, iLine);
508 if (RTStrNICmp(psz, RT_STR_TUPLE("MD =")))
509 return Error("%s(%d): Expected 'MD =' found '%.10s...'", ValueUnion.psz, iLine, psz);
510 psz = RTStrStripL(psz + 4);
513 rc = RTStrConvertHexBytes(psz, s_abExpectedDigest, cbDigest, 0 /*fFlags*/);
516 ValueUnion.psz, iLine, psz, rc);
539 ValueUnion.psz, iLine, cbDigest, s_abExpectedDigest, cbDigest, s_abActualDigest);