diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-08-11 04:52:09 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-08-11 04:52:09 +0000 |
commit | 08bef46fb105b9c6aecabbe017b56c9d09a9a45f (patch) | |
tree | 9c9eb5d4a93e85e542f574dcdf25c3618b6eec01 | |
parent | 152ca3c3a9312cfdca5be562b61a42f869980a96 (diff) |
Use EVP_MD in HKDF() and HKDF_extract() prototypes
Switch these prototypes to be like all other code and use the EVP_MD type
rather than the internal name of the struct. This also makes the function
definitions match the prototypes.
ok jsing
-rw-r--r-- | lib/libcrypto/hkdf/hkdf.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcrypto/hkdf/hkdf.h b/lib/libcrypto/hkdf/hkdf.h index 34450f9dd7f..6cec526e3e3 100644 --- a/lib/libcrypto/hkdf/hkdf.h +++ b/lib/libcrypto/hkdf/hkdf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hkdf.h,v 1.2 2018/04/03 13:33:53 tb Exp $ */ +/* $OpenBSD: hkdf.h,v 1.3 2023/08/11 04:52:08 tb Exp $ */ /* Copyright (c) 2014, Google Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -33,7 +33,7 @@ extern "C" { * a key from a password. */ -int HKDF(uint8_t *out_key, size_t out_len, const struct env_md_st *digest, +int HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest, const uint8_t *secret, size_t secret_len, const uint8_t *salt, size_t salt_len, const uint8_t *info, size_t info_len); @@ -43,9 +43,9 @@ int HKDF(uint8_t *out_key, size_t out_len, const struct env_md_st *digest, * and outputs |out_len| bytes to |out_key|. The maximum output size * is |EVP_MAX_MD_SIZE|. It returns one on success and zero on error. */ -int HKDF_extract(uint8_t *out_key, size_t *out_len, - const struct env_md_st *digest, const uint8_t *secret, - size_t secret_len, const uint8_t *salt, size_t salt_len); +int HKDF_extract(uint8_t *out_key, size_t *out_len, const EVP_MD *digest, + const uint8_t *secret, size_t secret_len, + const uint8_t *salt, size_t salt_len); /* * HKDF_expand computes a HKDF OKM (as specified by RFC 5869) of |