public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 2/4] crypto: use void* for hkdf_expand
@ 2021-11-22 20:44 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2021-11-22 20:44 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]

This makes it more flexible for other storage types
---
 src/crypto.c | 2 +-
 src/crypto.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/crypto.c b/src/crypto.c
index c5bf6fe1..7d5e42fe 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -860,7 +860,7 @@ bool hkdf_extract(enum l_checksum_type type, const void *key,
 	return (ret == (int) dlen);
 }
 
-bool hkdf_expand(enum l_checksum_type type, const uint8_t *key, size_t key_len,
+bool hkdf_expand(enum l_checksum_type type, const void *key, size_t key_len,
 			const char *info, void *out, size_t out_len)
 {
 	return prf_plus(type, key, key_len, info, out, out_len, 0);
diff --git a/src/crypto.h b/src/crypto.h
index eb48fe5b..b6fa2ec3 100644
--- a/src/crypto.h
+++ b/src/crypto.h
@@ -122,7 +122,7 @@ bool prf_plus(enum l_checksum_type type, const void *key, size_t key_len,
 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,
+bool hkdf_expand(enum l_checksum_type type, const void *key, size_t key_len,
 				const char *info, void *out, size_t out_len);
 
 bool crypto_derive_pairwise_ptk(const uint8_t *pmk, size_t pmk_len,
-- 
2.31.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-22 20:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-22 20:44 [PATCH 2/4] crypto: use void* for hkdf_expand James Prestwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox