Mercurial > dropbear
comparison demos/test/dsa_test.c @ 143:5d99163f7e32 libtomcrypt-orig
import of libtomcrypt 0.99
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 19 Dec 2004 11:34:45 +0000 |
parents | 6362d3854bb4 |
children |
comparison
equal
deleted
inserted
replaced
15:6362d3854bb4 | 143:5d99163f7e32 |
---|---|
1 #include "test.h" | 1 #include "test.h" |
2 | |
3 #ifdef MDSA | |
2 | 4 |
3 int dsa_test(void) | 5 int dsa_test(void) |
4 { | 6 { |
5 unsigned char msg[16], out[1024], out2[1024]; | 7 unsigned char msg[16], out[1024], out2[1024]; |
6 unsigned long x, y; | 8 unsigned long x; |
7 int err, stat1, stat2; | 9 int stat1, stat2; |
8 dsa_key key, key2; | 10 dsa_key key, key2; |
9 | 11 |
10 /* make a random key */ | 12 /* make a random key */ |
11 DO(dsa_make_key(&test_yarrow, find_prng("yarrow"), 20, 128, &key)); | 13 DO(dsa_make_key(&test_yarrow, find_prng("yarrow"), 20, 128, &key)); |
12 | 14 |
47 dsa_free(&key2); | 49 dsa_free(&key2); |
48 dsa_free(&key); | 50 dsa_free(&key); |
49 | 51 |
50 return 0; | 52 return 0; |
51 } | 53 } |
54 | |
55 #else | |
56 | |
57 int dsa_test(void) | |
58 { | |
59 printf("NOP"); | |
60 return 0; | |
61 } | |
62 | |
63 #endif |