Skip to content

Commit

Permalink
Match wc_ecc_ctx_set_kdf_salt argument names between header and imp…
Browse files Browse the repository at this point in the history
…lementation.
  • Loading branch information
dgarske committed May 20, 2024
1 parent 95095f5 commit 5a0594d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/dox_comments/header_files/ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ int wc_ecc_ctx_set_peer_salt(ecEncCtx* ctx, const byte* salt);
\param ctx pointer to the ecEncCtx for which to set the salt
\param salt pointer to salt buffer
\param len length salt in bytes
\param sz length salt in bytes
_Example_
\code
Expand All @@ -1742,7 +1742,7 @@ int wc_ecc_ctx_set_peer_salt(ecEncCtx* ctx, const byte* salt);
\sa wc_ecc_ctx_get_peer_salt
*/

int wc_ecc_ctx_set_kdf_salt(ecEncCtx* ctx, const byte* salt, word32 len);
int wc_ecc_ctx_set_kdf_salt(ecEncCtx* ctx, const byte* salt, word32 sz);

/*!
\ingroup ECC
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13834,13 +13834,13 @@ int wc_ecc_ctx_set_peer_salt(ecEncCtx* ctx, const byte* salt)
* @return 0 on success.
* @return BAD_FUNC_ARG when ctx is NULL or salt is NULL and len is not 0.
*/
int wc_ecc_ctx_set_kdf_salt(ecEncCtx* ctx, const byte* salt, word32 len)
int wc_ecc_ctx_set_kdf_salt(ecEncCtx* ctx, const byte* salt, word32 sz)
{
if (ctx == NULL || (salt == NULL && len != 0))
if (ctx == NULL || (salt == NULL && sz != 0))
return BAD_FUNC_ARG;

ctx->kdfSalt = salt;
ctx->kdfSaltSz = len;
ctx->kdfSaltSz = sz;

if (ctx->protocol == REQ_RESP_CLIENT) {
ctx->cliSt = ecCLI_SALT_SET;
Expand Down

0 comments on commit 5a0594d

Please sign in to comment.