Ejemplo n.º 1
0
static char * prv_get_digest_md5(authDesc_t * authP)
{
    char * A;
    char * AD;
    char * digest = NULL;

    A = str_cat_3(authP->name, PRV_COLUMN_STR, authP->secret);
    if (A != NULL)
    {
        AD = encode_b64_md5_str(A);
        free(A);
        if (AD != NULL)
        {
            buffer_t dataBuf;

            buf_cat_str_buf(AD, authP->data, &dataBuf);
            free(AD);
            if (dataBuf.buffer)
            {
                digest = encode_b64_md5(dataBuf);
                free(dataBuf.buffer);
            }
        }
    }

    return digest;
}
Ejemplo n.º 2
0
char * str_cat_5 (const char * first,
                  const char * second,
                  const char * third,
                  const char * fourth,
                  const char * fifth)
{
    char * string;
    char * string_tmp;

    string = NULL;
    string_tmp = str_cat_3(first, second, third);
    if (string_tmp)
    {
        string = str_cat_3(string_tmp, fourth, fifth);
        free(string_tmp);
    }

    return string;
}
Ejemplo n.º 3
0
static char * prv_get_digest_basic(authDesc_t * authP)
{
    char * A;
    char * digest = NULL;

    A = str_cat_3(authP->name, PRV_COLUMN_STR, authP->secret);
    if (A != NULL)
    {
        digest = encode_b64_str(A);
        free(A);
    }

    return digest;
}