~ubuntu-branches/ubuntu/saucy/nettle/saucy-proposed

« back to all changes in this revision

Viewing changes to testsuite/md4-test.c

  • Committer: Bazaar Package Importer
  • Author(s): Marek Habersack
  • Date: 2004-05-04 15:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20040504155602-7jbhw5mabvwksl3j
Tags: upstream-1.10
ImportĀ upstreamĀ versionĀ 1.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "testutils.h"
 
2
#include "md4.h"
 
3
 
 
4
int
 
5
test_main(void)
 
6
{
 
7
  /* Testcases from RFC 1320 */
 
8
  test_hash(&nettle_md4, LDATA(""),
 
9
            H("31d6cfe0d16ae931b73c59d7e0c089c0"));
 
10
  test_hash(&nettle_md4, LDATA("a"),
 
11
            H("bde52cb31de33e46245e05fbdbd6fb24"));
 
12
  test_hash(&nettle_md4, LDATA("abc"),
 
13
            H("a448017aaf21d8525fc10ae87aa6729d"));
 
14
  test_hash(&nettle_md4, LDATA("message digest"),
 
15
            H("d9130a8164549fe818874806e1c7014b"));
 
16
  test_hash(&nettle_md4, LDATA("abcdefghijklmnopqrstuvwxyz"),
 
17
            H("d79e1c308aa5bbcdeea8ed63df412da9"));
 
18
  test_hash(&nettle_md4,
 
19
            LDATA("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 
20
                  "0123456789"),
 
21
            H("043f8582f241db351ce627e153e7f0e4"));
 
22
  test_hash(&nettle_md4,
 
23
            LDATA("12345678901234567890123456789012345678901234567890"
 
24
                  "123456789012345678901234567890"),
 
25
            H("e33b4ddc9c38f2199c3e7b164fcc0536"));
 
26
  
 
27
  SUCCESS();
 
28
}