| 198 | } |
| 199 | |
| 200 | bool GetBinaryBlob( const char *pszTag, std::string &blob ) |
| 201 | { |
| 202 | char line[2048]; |
| 203 | RETURNFALSEIFNOT( fgets( line, sizeof(line), f ) ); |
| 204 | int lTag = V_strlen(pszTag); |
| 205 | RETURNFALSEIFNOT( V_strnicmp( line, pszTag, lTag ) == 0 ); |
| 206 | const char *p = line + lTag; |
| 207 | while ( isspace(*p) ) |
| 208 | ++p; |
| 209 | CHECK_EQUAL( *p, '=' ); |
| 210 | ++p; |
| 211 | while ( isspace(*p) ) |
| 212 | ++p; |
| 213 | |
| 214 | uint8 decodedData[ 1024 ]; |
| 215 | uint32 cbDecodedData = sizeof(decodedData); |
| 216 | RETURNFALSEIFNOT( CCrypto::HexDecode( p, decodedData, &cbDecodedData ) ); |
| 217 | blob.assign( (char *)decodedData, cbDecodedData ); |
| 218 | return true; |
| 219 | } |
| 220 | }; |
| 221 | |
| 222 | void TestSymmetricAuthCrypto_EncryptTestVectorFile( const char *pszFilename ) |
no test coverage detected