Files Classes Functions Hierarchy
#include <cassert>#include <iostream>#include <NTL/ZZ.h>#include <commandline.h>#include <passwordverifier001test.h>#include <rsastate.h>#include <rsatest.h>
Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 14 of file main.cpp.
References commandline::hastoken(), commandline::mapvar(), rsatest::test01(), passwordverifier001test::test02(), rsatest::test02(), passwordverifier001test::unittest01(), rsatest::unittest01(), and rsatest::unittest02().
00015 { 00016 commandline cmd(argc,argv); 00017 uint prog(0); 00018 cmd.mapvar(prog,"prog"); 00019 00020 if (cmd.hastoken("rsa")) 00021 { 00022 rsastate s(argc,argv); 00023 00024 return 0; 00025 } 00026 00027 switch (prog) 00028 { 00029 case 0: 00030 cout << "To run the RSA encryption/decrytion program" << endl; 00031 cout << "./main rsa" << endl; 00032 cout << "Other programs." << endl; 00033 00034 cout << "./main prog=1 - Small RSA example with maths library." << endl; 00035 cout << "./main prog=2 - Small RSA example with rsa classes." << endl; 00036 cout << "./main prog=3 - String and stream conversions written to files." << endl; 00037 cout << "./main prog=4 - Comparing sequential and random prime generation." << endl; 00038 00039 break; 00040 00041 case 1: return rsatest::unittest01(); 00042 case 2: return rsatest::unittest02(); 00043 case 3: rsatest::test01(); break; 00044 case 4: rsatest::test02(argc,argv); break; 00045 00046 case 10: return passwordverifier001test::unittest01(); 00047 case 11: passwordverifier001test::test02(); break; 00048 00049 default: cout << "error: No case handled." << endl; return 1; 00050 } 00051 00052 return 0; 00053 }
1.5.8