~ubuntu-branches/ubuntu/quantal/nettle/quantal

« back to all changes in this revision

Viewing changes to testsuite/md2-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 "md2.h"
 
3
 
 
4
int
 
5
test_main(void)
 
6
{
 
7
  /* Testcases from RFC 1319 */
 
8
  test_hash(&nettle_md2, 0, "",
 
9
            H("8350e5a3e24c153df2275c9f80692773"));
 
10
  test_hash(&nettle_md2, LDATA("a"),
 
11
            H("32ec01ec4a6dac72c0ab96fb34c0b5d1"));
 
12
  test_hash(&nettle_md2, LDATA("abc"),
 
13
            H("da853b0d3f88d99b30283a69e6ded6bb"));
 
14
  test_hash(&nettle_md2, LDATA("message digest"),
 
15
            H("ab4f496bfb2a530b219ff33031fe06b0"));
 
16
  test_hash(&nettle_md2, LDATA("abcdefghijklmnopqrstuvwxyz"),
 
17
            H("4e8ddff3650292ab5a4108c3aa47940b"));
 
18
  test_hash(&nettle_md2,
 
19
            LDATA("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 
20
                  "0123456789"),
 
21
            H("da33def2a42df13975352846c30338cd"));
 
22
  test_hash(&nettle_md2, LDATA("1234567890123456789012345678901234567890"
 
23
                               "1234567890123456789012345678901234567890"),
 
24
            H("d5976f79d83d3a0dc9806c3c66f3efd8"));
 
25
 
 
26
  SUCCESS();
 
27
}