crypto: Make hkdf_extract take void *

This makes it easier to use from unit tests and other places which might
be dealing with const char * data.
This commit is contained in:
Denis Kenzior 2021-06-29 11:11:24 -05:00
parent ed283d7b14
commit 412fea3ffa
2 changed files with 4 additions and 4 deletions

View File

@ -770,9 +770,9 @@ bool kdf_sha384(const void *key, size_t key_len,
*
* Null key equates to a zero key (makes calls in EAP-PWD more convenient)
*/
bool hkdf_extract(enum l_checksum_type type, const uint8_t *key,
bool hkdf_extract(enum l_checksum_type type, const void *key,
size_t key_len, uint8_t num_args,
uint8_t *out, ...)
void *out, ...)
{
struct l_checksum *hmac;
struct iovec iov[num_args];

View File

@ -109,8 +109,8 @@ bool prf_sha1(const void *key, size_t key_len,
bool prf_plus_sha1(const void *key, size_t key_len,
const void *prefix, size_t prefix_len,
const void *data, size_t data_len, void *output, size_t size);
bool hkdf_extract(enum l_checksum_type type, const uint8_t *key, size_t key_len,
uint8_t num_args, uint8_t *out, ...);
bool hkdf_extract(enum l_checksum_type type, const void *key, size_t key_len,
uint8_t num_args, void *out, ...);
bool hkdf_expand(enum l_checksum_type type, const uint8_t *key, size_t key_len,
const char *info, size_t info_len, void *out,