src/wolfSSL/wolfcrypt/src/rsa.c
static int wc_RsaPad_ex(const byte* input, word32 inputLen, byte* pkcsBlock,
               word32 pkcsBlockLen, byte padValue, WC_RNG* rng, int padType,
               enum wc_HashType hType, int mgf, byte* optLabel, word32 labelLen)
{
    int ret;

    switch (padType)
    {
        case WC_RSA_PKCSV15_PAD:
            WOLFSSL_MSG("wolfSSL Using RSA PKCSV15 padding");
            ret = wc_RsaPad(input, inputLen, pkcsBlock, pkcsBlockLen,
                                                                 padValue, rng);
            break;

        case WC_RSA_OAEP_PAD:
            WOLFSSL_MSG("wolfSSL Using RSA OAEP padding");
            ret = wc_RsaPad_OAEP(input, inputLen, pkcsBlock, pkcsBlockLen,
                             padValue, rng, hType, mgf, optLabel, labelLen);
            break;

        default:
            WOLFSSL_MSG("Unknown RSA Pad Type");
            ret = RSA_PAD_E;
    }

    /* silence warning if not used with padding scheme */
    (void)padType;
    (void)hType;
    (void)mgf;
    (void)optLabel;
    (void)labelLen;

    return ret;
}
/* helper function to direct which padding is used */
helper function to direct which padding is used
helper function to direct which padding is used
static int wc_RsaPad_ex(const byte* input, word32 inputLen, byte* pkcsBlock,
               word32 pkcsBlockLen, byte padValue, WC_RNG* rng, int padType,
               enum wc_HashType hType, int mgf, byte* optLabel, word32 labelLen)
{
    int ret;
    switch (padType)
    {
        case WC_RSA_PKCSV15_PAD:
            WOLFSSL_MSG("wolfSSL Using RSA PKCSV15 padding");
            ret = wc_RsaPad(input, inputLen, pkcsBlock, pkcsBlockLen,
                                                                 padValue, rng);
            break;
        case WC_RSA_OAEP_PAD:
            WOLFSSL_MSG("wolfSSL Using RSA OAEP padding");
            ret = wc_RsaPad_OAEP(input, inputLen, pkcsBlock, pkcsBlockLen,
                             padValue, rng, hType, mgf, optLabel, labelLen);
            break;
        default:
            WOLFSSL_MSG("Unknown RSA Pad Type");
            ret = RSA_PAD_E;
    }
    (void)padType;
    (void)hType;
    (void)mgf;
    (void)optLabel;
    (void)labelLen;
    return ret;
}
static int wc_RsaPad_ex ( const byte * input , word32 inputLen , byte * pkcsBlock , word32 pkcsBlockLen , byte padValue , WC_RNG * rng , int padType , enum wc_HashType hType , int mgf , byte * optLabel , word32 labelLen ) { int ret ; switch ( padType ) { case WC_RSA_PKCSV15_PAD : WOLFSSL_MSG ( " " ) ; ret = wc_RsaPad ( input , inputLen , pkcsBlock , pkcsBlockLen , padValue , rng ) ; break ; case WC_RSA_OAEP_PAD : WOLFSSL_MSG ( " " ) ; ret = wc_RsaPad_OAEP ( input , inputLen , pkcsBlock , pkcsBlockLen , padValue , rng , hType , mgf , optLabel , labelLen ) ; break ; default : WOLFSSL_MSG ( " " ) ; ret = RSA_PAD_E ; } ( void ) padType ; ( void ) hType ; ( void ) mgf ; ( void ) optLabel ; ( void ) labelLen ; return ret ; }
helper function to direct which padding is used
helper function to direct which padding is used
/* silence warning if not used with padding scheme */