コード例 #1
0
ファイル: auth.c プロジェクト: kamihouse/goahead
/*
    Create a nonce value for digest authentication (RFC 2617)
 */
static char *createDigestNonce(Webs *wp)
{
    static int64 next = 0;
    char         nonce[256];

    assure(wp);
    assure(wp->route);
    fmt(nonce, sizeof(nonce), "%s:%s:%x:%x", secret, BIT_REALM, time(0), next++);
    return websEncode64(nonce);
}
コード例 #2
0
ファイル: auth.c プロジェクト: Liu1992/GasSub_LPC1788
/*
    Create a nonce value for digest authentication (RFC 2617)
 */
static char *createDigestNonce(Webs *wp)
{
    static int64 next = 0;
    char         nonce[256];

    assert(wp);
    assert(wp->route);
    fmt(nonce, sizeof(nonce), "%s:%s:%x:%x", secret, ME_GOAHEAD_REALM, OSTimeGet(), next++);
    return websEncode64(nonce);
}