|
@@ -11,25 +11,25 @@ int cipher_hash_test(void)
|
|
|
|
|
|
/* test ciphers */
|
|
|
for (x = 0; cipher_descriptor[x].name != NULL; x++) {
|
|
|
- DO(cipher_descriptor[x].test());
|
|
|
+ DOX(cipher_descriptor[x].test(), cipher_descriptor[x].name);
|
|
|
}
|
|
|
|
|
|
/* test hashes */
|
|
|
for (x = 0; hash_descriptor[x].name != NULL; x++) {
|
|
|
- DO(hash_descriptor[x].test());
|
|
|
+ DOX(hash_descriptor[x].test(), hash_descriptor[x].name);
|
|
|
}
|
|
|
|
|
|
/* test prngs (test, import/export */
|
|
|
for (x = 0; prng_descriptor[x].name != NULL; x++) {
|
|
|
- DO(prng_descriptor[x].test());
|
|
|
- DO(prng_descriptor[x].start(&nprng));
|
|
|
- DO(prng_descriptor[x].add_entropy((unsigned char *)"helloworld12", 12, &nprng));
|
|
|
- DO(prng_descriptor[x].ready(&nprng));
|
|
|
+ DOX(prng_descriptor[x].test(), prng_descriptor[x].name);
|
|
|
+ DOX(prng_descriptor[x].start(&nprng), prng_descriptor[x].name);
|
|
|
+ DOX(prng_descriptor[x].add_entropy((unsigned char *)"helloworld12", 12, &nprng), prng_descriptor[x].name);
|
|
|
+ DOX(prng_descriptor[x].ready(&nprng), prng_descriptor[x].name);
|
|
|
n = sizeof(buf);
|
|
|
- DO(prng_descriptor[x].pexport(buf, &n, &nprng));
|
|
|
+ DOX(prng_descriptor[x].pexport(buf, &n, &nprng), prng_descriptor[x].name);
|
|
|
prng_descriptor[x].done(&nprng);
|
|
|
- DO(prng_descriptor[x].pimport(buf, n, &nprng));
|
|
|
- DO(prng_descriptor[x].ready(&nprng));
|
|
|
+ DOX(prng_descriptor[x].pimport(buf, n, &nprng), prng_descriptor[x].name);
|
|
|
+ DOX(prng_descriptor[x].ready(&nprng), prng_descriptor[x].name);
|
|
|
if (prng_descriptor[x].read(buf, 100, &nprng) != 100) {
|
|
|
fprintf(stderr, "Error reading from imported PRNG!\n");
|
|
|
exit(EXIT_FAILURE);
|