-
+ 5F400376F8290AE83062C457BEDFDE1FB7A2C2E31EFE956ADA2E4DC4EAAF6871428B74BE1193D9268EE74CF454BDC3DF5C4C4A88E6942D216DDB5A0395F48099mpi/tests/test_mpi.c(0 . 0)(1 . 39)
5454 #include "mpi.h"
5455 #include <stdlib.h>
5456
5457 void err(char *msg)
5458 {
5459 fprintf(stderr, "%s\n", msg);
5460 exit(1);
5461 }
5462
5463 void terpri(FILE *fp)
5464 {
5465 fprintf(fp, "\n");
5466 }
5467
5468 int main(int ac, char **av)
5469 {
5470 MPI a, b, y;
5471 int r;
5472
5473 r = secmem_init(1000);
5474 if (r==0) err("secmem init");
5475
5476 a = mpi_alloc_secure(0);
5477 b = mpi_alloc_secure(0);
5478 y = mpi_alloc_secure(0);
5479 mpi_fromstr(a, "0x1B0B206C488601");
5480 mpi_fromstr(b, "0x20E92FE28E1929");
5481 mpi_mul(y, a, b);
5482 mpi_free(a);
5483 mpi_free(b);
5484
5485 mpi_print(stdout, y, 1);
5486 mpi_free(y);
5487
5488 terpri(stdout);
5489 secmem_term();
5490
5491 return 0;
5492 }