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