Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
unsigned char sha2_256[SHA256_DIGEST_LENGTH];
};
-#define PAKFIRE_DIGESTS_INIT \
- { \
- .sha3_512 = 0, \
- .sha3_256 = 0, \
- .blake2b512 = 0, \
- .blake2s256 = 0, \
- .sha2_512 = 0, \
- .sha2_256 = 0, \
- }
-
size_t pakfire_digest_length(const enum pakfire_digest_types digest);
const unsigned char* pakfire_digest_get(struct pakfire_digests* digests,
};
static int test_init(const struct test* t) {
- struct pakfire_digests digests = PAKFIRE_DIGESTS_INIT;
+ struct pakfire_digests digests = {};
// Check if everything is initialized correctly
ASSERT(pakfire_digest_set(digests.sha2_512) == 0);
}
static int test_random(const struct test* t) {
- struct pakfire_digests digests = PAKFIRE_DIGESTS_INIT;
+ struct pakfire_digests digests = {};
FILE* f = NULL;
int r = EXIT_FAILURE;