From 63802849a1765002dee42595c098ae03cbb84366 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 22 Feb 2018 09:55:20 -0700 Subject: [PATCH] remove magic number --- wolfcrypt/src/rsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index d02802a20..27aeed722 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -877,7 +877,7 @@ static int wc_RsaPad_ex(const byte* input, word32 inputLen, byte* pkcsBlock, /* In the case of no padding being used check that input is exactly * the RSA key length */ - if (bits <= 0 || inputLen != ((word32)bits/8)) { + if (bits <= 0 || inputLen != ((word32)bits/WOLFSSL_BIT_SIZE)) { WOLFSSL_MSG("Bad input size"); ret = RSA_PAD_E; } @@ -1155,7 +1155,7 @@ static int wc_RsaUnPad_ex(byte* pkcsBlock, word32 pkcsBlockLen, byte** out, /* In the case of no padding being used check that input is exactly * the RSA key length */ - if (bits <= 0 || pkcsBlockLen != ((word32)bits/8)) { + if (bits <= 0 || pkcsBlockLen != ((word32)bits/WOLFSSL_BIT_SIZE)) { WOLFSSL_MSG("Bad input size"); ret = RSA_PAD_E; }