public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH 2/4] crypto: use void* for hkdf_expand
Date: Mon, 22 Nov 2021 12:44:23 -0800	[thread overview]
Message-ID: <20211122204425.3567479-2-prestwoj@gmail.com> (raw)
In-Reply-To: 20211122204425.3567479-1-prestwoj@gmail.com

[-- 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

                 reply	other threads:[~2021-11-22 20:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211122204425.3567479-2-prestwoj@gmail.com \
    --to=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox