proj home

Files   Classes   Functions   Hierarchy  

passwordverifier001.h

Go to the documentation of this file.
00001 #ifndef PASSWORDVERIFIER001_H
00002 #define PASSWORDVERIFIER001_H
00003 
00004 #include <NTL/ZZ.h>
00005 using namespace NTL;
00006 
00007 #include <typedefs.h>
00008 
00015 class passwordverifier001
00016 {
00017 public:
00018 
00020   ZZ password;
00022   ZZ j1;
00024   ZZ j2;
00026   ZZ n1;
00028   ZZ n2;
00030   ZZ k1;
00031 
00033   uintc nbits;
00034 
00036   passwordverifier001(uintc nbits_)
00037     : nbits(nbits_) {}
00038 
00040   void generatePassword();
00041 
00043   void generateRandomFunction();
00044 
00046   void parameters_set(stringc & parameters );
00048   void parameters_get(string & parameters );
00049 
00051   void eval( ZZ & val ) const;
00052 
00054   void eval( string & val ) const;
00055 
00058   boolc verify( stringc & attempt ) const;
00059 
00060 private:
00061 
00062   static void random(ZZ & num, uintc nb);
00063 
00064   static void convInverse(string & wstr, ZZ const w );
00065 };
00066 
00067 
00068 
00069     
00070 
00071 
00072 #endif
00073 
00074 

Generated on Fri Mar 4 00:49:31 2011 for Chelton Evans Source by  doxygen 1.5.8