diff options
author | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-07-21 08:00:49 +0200 |
---|---|---|
committer | Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de> | 2018-07-21 08:00:49 +0200 |
commit | ee4adf9768a740c3d79b854453eb8bc0f5c14d30 (patch) | |
tree | 3c7d321c31cbebd56a6fcb883a43b8f6136a3dd8 /src/include/gnunet_crypto_lib.h | |
parent | 1914b435ce08b95c02d9c630acc292f4a7548a47 (diff) | |
download | gnunet-ee4adf9768a740c3d79b854453eb8bc0f5c14d30.tar.gz gnunet-ee4adf9768a740c3d79b854453eb8bc0f5c14d30.zip |
add more general HMAC function for JWTs
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 7b69c157f..8a591fa09 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -726,6 +726,23 @@ GNUNET_CRYPTO_hash_context_abort (struct GNUNET_HashContext *hc); | |||
726 | 726 | ||
727 | 727 | ||
728 | /** | 728 | /** |
729 | * Calculate HMAC of a message (RFC 2104) | ||
730 | * TODO: Shouldn' this be the standard hmac function and | ||
731 | * the above be renamed? | ||
732 | * | ||
733 | * @param key secret key | ||
734 | * @param key_len secret key length | ||
735 | * @param plaintext input plaintext | ||
736 | * @param plaintext_len length of @a plaintext | ||
737 | * @param hmac where to store the hmac | ||
738 | */ | ||
739 | void | ||
740 | GNUNET_CRYPTO_hmac_raw (const void *key, size_t key_len, | ||
741 | const void *plaintext, size_t plaintext_len, | ||
742 | struct GNUNET_HashCode *hmac); | ||
743 | |||
744 | |||
745 | /** | ||
729 | * @ingroup hash | 746 | * @ingroup hash |
730 | * Calculate HMAC of a message (RFC 2104) | 747 | * Calculate HMAC of a message (RFC 2104) |
731 | * | 748 | * |