24 #include "../crypto/test/file_test.h"
25 #include "../crypto/test/test_util.h"
31 if (!t->GetInstruction(&md_len_str,
"L")) {
34 const size_t md_len = strtoul(md_len_str.c_str(),
nullptr, 0);
58 std::vector<uint8_t>
key,
msg;
59 if (!t->GetAttribute(&count_str,
"Count") ||
60 !t->GetAttribute(&k_len_str,
"Klen") ||
61 !t->GetAttribute(&t_len_str,
"Tlen") ||
62 !t->GetBytes(&
key,
"Key") ||
63 !t->GetBytes(&
msg,
"Msg")) {
67 size_t k_len = strtoul(k_len_str.c_str(),
nullptr, 0);
68 size_t t_len = strtoul(t_len_str.c_str(),
nullptr, 0);
69 if (
key.size() < k_len) {
79 if (out_len < t_len) {
83 printf(
"%s", t->CurrentTestToString().c_str());
91 fprintf(
stderr,
"usage: %s <test file>\n",
arg);
97 return usage(argv[0]);