#include <stdio.h>

#include "md5mini.h"

int main(void) {
    #ifndef NDEBUG
    md5mini_run_all_tests();
    #endif

    unsigned char tmp[16];
    md5mini(tmp, "abc");
    printf("md5(\"abc\") =");
    for (int k = 0; k < 16; k++) printf(" %02X", tmp[k]);
    printf("\n  expected = 90 01 50 98 3C D2 4F B0 D6 96 3F 7D 28 E1 7F 72\n");

    md5mini(tmp, "message digest");
    printf("md5(\"message digest\") =");
    for (int k = 0; k < 16; k++) printf(" %02X", tmp[k]);
    printf("\n             expected = F9 6B 69 7D 7C B7 93 8D 52 5A 2F 31 AA F1 61 D0\n");
}
