mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
add do_compare_testvector()
This commit is contained in:
parent
4d17d1328d
commit
ecd3fb714d
2 changed files with 11 additions and 0 deletions
|
|
@ -61,6 +61,15 @@ void print_hex(const char* what, const void* v, const unsigned long l)
|
|||
}
|
||||
}
|
||||
|
||||
int do_compare_testvector(const void* is, const unsigned long is_len, const void* should, const unsigned long should_len, const char* what, int which)
|
||||
{
|
||||
if (compare_testvector(is, is_len, should, should_len, what, which) == 0) {
|
||||
return CRYPT_OK;
|
||||
} else {
|
||||
return CRYPT_FAIL_TESTVECTOR;
|
||||
}
|
||||
}
|
||||
|
||||
prng_state yarrow_prng;
|
||||
|
||||
/* ref: $Format:%D$ */
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ void run_cmd(int res, int line, const char *file, const char *cmd, const char *a
|
|||
|
||||
void print_hex(const char* what, const void* v, const unsigned long l);
|
||||
|
||||
int do_compare_testvector(const void* is, const unsigned long is_len, const void* should, const unsigned long should_len, const char* what, int which);
|
||||
|
||||
#endif /* DEMOS_COMMON_H_ */
|
||||
|
||||
/* ref: $Format:%D$ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue