Home | History | Annotate | Download | only in hdr
      1 #ifndef GENERATEPASSWORD_H
      2 #define GENERATEPASSWORD_H
      3 
      4 class GeneratePassword
      5 {
      6 
      7  public:
      8 
      9   GeneratePassword();
     10 
     11   ~GeneratePassword();
     12 
     13   char * generateClientPasswordKey(char * deviceId);
     14 
     15   char * generateKeyFromDict(char * deviceId, char dict[]);
     16 
     17   char * generateServerPasswordKey(char * deviceId);
     18 
     19   char * generateClientPassword(char * deviceId, char * serverId);
     20 
     21   char * generateServerPassword(char * deviceId, char * serverId);
     22 
     23   char * generateClientPassword();
     24 
     25   char * generateServerPassword();
     26 
     27   char * encodeDeviceId(char * deviceId);
     28 
     29   char * get36BasedIMEI(char * deviceId);
     30 
     31   char * generatePassword(char * deviceId, char * serverId, char * key);
     32 
     33   char * encodeHex(char data[]);
     34 
     35   long long convertChar2Long(char * input);
     36 
     37   void shuffle(char & buffer);
     38 
     39   void setServerId(const char * sid);
     40 
     41   void setIMEI(const char * did);
     42 
     43   char * getIMEI();
     44 
     45   char * getServerId();
     46 
     47  private:
     48 
     49   char * serverId;
     50   char * imei;
     51   char clientPasswordDict [15];
     52   char serverPasswordDict[15];
     53   char hexTable[16];
     54   int MD5_HASH_LENGTH;
     55 };
     56 
     57 #endif
     58