Changeset 5f40da7 for lib/md5.c


Ignore:
Timestamp:
2011-12-26T10:51:19Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
199fea6
Parents:
96f954d (diff), 644b808 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging oauth-xmpp branch, which adds support for OAuth2 authentication
against some XMPP services (Google Talk, Facebook and Microsoft's MSN-XMPP
gateway).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/md5.c

    r96f954d r5f40da7  
    2424#include <sys/types.h>
    2525#include <string.h>             /* for memcpy() */
     26#include <stdio.h>
    2627#include "md5.h"
    2728
     
    160161        memcpy(digest, ctx->buf, 16);
    161162        memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */
     163}
     164
     165void md5_finish_ascii(struct MD5Context *context, char *ascii)
     166{
     167        md5_byte_t bin[16];
     168        int i;
     169       
     170        md5_finish(context, bin);
     171        for (i = 0; i < 16; i ++)
     172                sprintf(ascii + i * 2, "%02x", bin[i]);
    162173}
    163174
Note: See TracChangeset for help on using the changeset viewer.