|
32 | 32 | */ |
33 | 33 |
|
34 | 34 |
|
35 | | -static const unsigned char two_generator[] = { 2 }; |
| 35 | +static const unsigned int two_generator = 2; |
36 | 36 |
|
37 | 37 | static const unsigned char group_modp1[] = { |
38 | 38 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc9, 0x0f, |
@@ -394,20 +394,19 @@ typedef struct { |
394 | 394 | const char* name; |
395 | 395 | const char* prime; |
396 | 396 | unsigned int prime_size; |
397 | | - const char* gen; |
398 | | - unsigned int gen_size; |
| 397 | + unsigned int gen; |
399 | 398 | } modp_group; |
400 | 399 |
|
401 | 400 | static const modp_group modp_groups[] = { |
402 | 401 | #define V(var) reinterpret_cast<const char*>(var) |
403 | | - { "modp1", V(group_modp1), sizeof(group_modp1), V(two_generator), 1 }, |
404 | | - { "modp2", V(group_modp2), sizeof(group_modp2), V(two_generator), 1 }, |
405 | | - { "modp5", V(group_modp5), sizeof(group_modp5), V(two_generator), 1 }, |
406 | | - { "modp14", V(group_modp14), sizeof(group_modp14), V(two_generator), 1 }, |
407 | | - { "modp15", V(group_modp15), sizeof(group_modp15), V(two_generator), 1 }, |
408 | | - { "modp16", V(group_modp16), sizeof(group_modp16), V(two_generator), 1 }, |
409 | | - { "modp17", V(group_modp17), sizeof(group_modp17), V(two_generator), 1 }, |
410 | | - { "modp18", V(group_modp18), sizeof(group_modp18), V(two_generator), 1 } |
| 402 | + { "modp1", V(group_modp1), sizeof(group_modp1), two_generator }, |
| 403 | + { "modp2", V(group_modp2), sizeof(group_modp2), two_generator }, |
| 404 | + { "modp5", V(group_modp5), sizeof(group_modp5), two_generator }, |
| 405 | + { "modp14", V(group_modp14), sizeof(group_modp14), two_generator }, |
| 406 | + { "modp15", V(group_modp15), sizeof(group_modp15), two_generator }, |
| 407 | + { "modp16", V(group_modp16), sizeof(group_modp16), two_generator }, |
| 408 | + { "modp17", V(group_modp17), sizeof(group_modp17), two_generator }, |
| 409 | + { "modp18", V(group_modp18), sizeof(group_modp18), two_generator } |
411 | 410 | #undef V |
412 | 411 | }; |
413 | 412 |
|
|
0 commit comments