-
Hi, first of all thank you for this awesome library! I'm currently looking into using the HMAC-SHA-2 multi-part API, and one limitation I noticed is that it doesn't seem to be possible to reuse the same HMAC state without calling Would it make sense to have such an API in libsodium? Should I just call Thanks again :) PS: I tried to subscribe to the mailing list mentioned in the README, but nothing happened. Is it still in use? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi! The So, before calling |
Beta Was this translation helpful? Give feedback.
-
Il giorno mar 27 dic 2022 alle 04:20:53 -08:00:00, Frank Denis
***@***.***> ha scritto:
The crypto_auth_*_state values can be copied. Libsodium doesn't do
dynamic allocations, so there are no pointers inside and you can just
copy them as a blog of bytes.
So, before calling _final(), copy the state, and reuse it afterwards
as needed.
Hi Frank, thanks for the fast reply! I'll do as you suggested :)
|
Beta Was this translation helpful? Give feedback.
Hi!
The
crypto_auth_*_state
values can be copied. Libsodium doesn't do dynamic allocations, so there are no pointers inside and you can just copy them as a blob of bytes.So, before calling
_final()
, copy the state, and reuse it afterwards as needed.