version 0.0.1
[fms.git] / include / freenet / captcha / simplecaptcha.h
1 #ifndef _simple_captcha_\r
2 #define _simple_captcha_\r
3 \r
4 #include "icaptcha.h"\r
5 \r
6 class SimpleCaptcha:public ICaptcha\r
7 {\r
8 public:\r
9 \r
10         void Generate();\r
11 \r
12         const bool GetPuzzle(std::vector<unsigned char> &puzzle);\r
13         const bool GetSolution(std::vector<unsigned char> &solution);\r
14 \r
15 private:\r
16         const std::string GenerateRandomString(const int len);\r
17         void ReadPuzzleData(const std::string &filename);\r
18 \r
19         std::vector<unsigned char> m_puzzle;\r
20         std::vector<unsigned char> m_solution;\r
21 \r
22 };\r
23 \r
24 #endif  // _simple_captcha_\r