Lines Matching refs:hash
9 void mbedtls_sha1(data_t *src_str, data_t *hash)
18 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x, 20, hash->len) == 0);
43 void sha224(data_t *src_str, data_t *hash)
52 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 28, hash->len), 0);
57 void mbedtls_sha256(data_t *src_str, data_t *hash)
66 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 32, hash->len), 0);
91 void sha384(data_t *src_str, data_t *hash)
100 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 48, hash->len), 0);
105 void mbedtls_sha512(data_t *src_str, data_t *hash)
114 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 64, hash->len), 0);
154 void mbedtls_sha3(int family, data_t *in, data_t *hash)
158 TEST_CALLOC(output, hash->len);
160 TEST_ASSERT(mbedtls_sha3(family, in->x, in->len, output, hash->len) == 0);
162 TEST_MEMORY_COMPARE(output, hash->len, hash->x, hash->len);
193 void mbedtls_sha3_multi(int family, data_t *in, data_t *hash)
199 TEST_CALLOC(output, hash->len);
208 TEST_ASSERT(mbedtls_sha3_finish(&ctx, output, hash->len) == 0);
210 TEST_MEMORY_COMPARE(output, hash->len, hash->x, hash->len);
222 unsigned char hash[64];
232 memset(hash, 0, sizeof(hash));
235 /* Generate a reference hash */
241 * At each test ensure that the same hash is generated.
256 mbedtls_sha3_finish(&ctx, hash, hash_length);
259 TEST_MEMORY_COMPARE(hash, hash_length, reference_hash, hash_length);