md5.h
author Ryan C. Gordon <icculus@icculus.org>
Sun, 18 Jun 2017 19:40:30 -0400
changeset 56 a573346e6f7b
parent 0 d7ee4e2ed49d
permissions -rw-r--r--
Added One Time Password support.

This is only for time-based OTP for now ("TOPT" algorithm), but that's more
or less what one expects to see in the wild anyhow.

This is sort of a placeholder UI until I replace the entire existing UI with
something better.
#ifndef _INCL_MD5_H_
#define _INCL_MD5_H_

#include <stdint.h>

typedef struct MD5_CTX
{
    uint32_t count[2];
    uint32_t abcd[4];
    uint8_t buf[64];
} MD5_CTX;

void MD5_init(MD5_CTX *pms);
void MD5_append(MD5_CTX *pms, const uint8_t *data, int nbytes);
void MD5_finish(MD5_CTX *pms, uint8_t digest[16]);

#endif

// end of md5.h ...