Lines Matching full:hmac

2  * QEMU Crypto hmac algorithms tests
17 #include "crypto/hmac.h"
97 QCryptoHmac *hmac = NULL; in test_hmac_alloc() local
110 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_alloc()
112 g_assert(hmac != NULL); in test_hmac_alloc()
114 ret = qcrypto_hmac_bytes(hmac, (const char *)INPUT_TEXT, in test_hmac_alloc()
124 qcrypto_hmac_free(hmac); in test_hmac_alloc()
136 QCryptoHmac *hmac = NULL; in test_hmac_prealloc() local
152 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_prealloc()
154 g_assert(hmac != NULL); in test_hmac_prealloc()
156 ret = qcrypto_hmac_bytes(hmac, (const char *)INPUT_TEXT, in test_hmac_prealloc()
169 qcrypto_hmac_free(hmac); in test_hmac_prealloc()
181 QCryptoHmac *hmac = NULL; in test_hmac_iov() local
199 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_iov()
201 g_assert(hmac != NULL); in test_hmac_iov()
203 ret = qcrypto_hmac_bytesv(hmac, iov, 3, &result, in test_hmac_iov()
212 qcrypto_hmac_free(hmac); in test_hmac_iov()
224 QCryptoHmac *hmac = NULL; in test_hmac_digest() local
235 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_digest()
237 g_assert(hmac != NULL); in test_hmac_digest()
239 ret = qcrypto_hmac_digest(hmac, (const char *)INPUT_TEXT, in test_hmac_digest()
246 qcrypto_hmac_free(hmac); in test_hmac_digest()
258 g_test_add_func("/crypto/hmac/iov", test_hmac_iov); in main()
259 g_test_add_func("/crypto/hmac/alloc", test_hmac_alloc); in main()
260 g_test_add_func("/crypto/hmac/prealloc", test_hmac_prealloc); in main()
261 g_test_add_func("/crypto/hmac/digest", test_hmac_digest); in main()