Skip to content

Commit

Permalink
Moved variable to the top of the scope
Browse files Browse the repository at this point in the history
  • Loading branch information
gasbytes committed Dec 18, 2024
1 parent 542f756 commit ef40ae1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4863,6 +4863,7 @@ int wolfSSL_PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
{
const char *nostring = "";
int ret = 0;
enum wc_HashType pbkdf2HashType;

if (pass == NULL) {
passlen = 0;
Expand All @@ -4871,7 +4872,7 @@ int wolfSSL_PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
passlen = (int)XSTRLEN(pass);
}

enum wc_HashType pbkdf2HashType = EvpMd2MacType(digest);
pbkdf2HashType = EvpMd2MacType(digest);

ret = wc_PBKDF2((byte*)out, (byte*)pass, passlen, (byte*)salt, saltlen,
iter, keylen, pbkdf2HashType);
Expand Down

0 comments on commit ef40ae1

Please sign in to comment.