Main Page | Namespace List | Data Structures | File List | Data Fields | Globals

cipher.h

Go to the documentation of this file.
00001 #ifndef CIPHER_H 
00002 #define CIPHER_H
00003 
00004 using namespace std;
00005 
00006 #include <vector>
00007 #include <iostream>
00008 #include <iomanip>
00009 #include <fstream>
00010 #include <string>
00011 
00013 class nzCipherText {
00014  private:
00016   string text;
00018   string name;
00020   int freq[26];
00022   string stripText(string strIn);
00024   string identify();
00026   int getMinIndex(vector<double> vect);
00027 
00028  public:
00030   nzCipherText();
00032   nzCipherText(string tName);
00034   nzCipherText(string tText, string tName);
00036   void reset();
00038   void setName(string tName) {name=tName;};
00040   void add(char addChar);
00042   void add(int charCode);
00044   void add(string strIn);
00046   void addFile(const char* fName);
00048   void blockPrint();
00050   double getEnglishChi2();
00052   double getFrenchChi2();
00054   double getUniformChi2();
00056   double getReflectorChi2();
00058   string str() {return text;};
00060   void writeFreqTable(const char* outFile);
00061   
00062 };
00063 
00064 #endif
00065