Changeset 85
- Timestamp:
- 01/13/06 23:35:19 (3 years ago)
- Location:
- trunk/src/config
- Files:
-
- 2 modified
-
vidaliasettings.cpp (modified) (3 diffs)
-
vidaliasettings.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/config/vidaliasettings.cpp
r71 r85 32 32 #define SETTING_CONTROL_ADDR "Tor/ControlAddr" 33 33 #define SETTING_CONTROL_PORT "Tor/ControlPort" 34 #define SETTING_AUTH_TOKEN "Tor/AuthToken" 34 35 35 36 /* Default Settings */ … … 45 46 #define DEFAULT_CONTROL_ADDR "127.0.0.1" 46 47 #define DEFAULT_CONTROL_PORT 9051 48 #define DEFAULT_AUTH_TOKEN "" 47 49 48 50 /** Default Constructor … … 166 168 } 167 169 170 /** Get the authentication token sent by the controller to Tor. For now, this 171 * just sends the default (blank) authentication token. It is implemented as a 172 * stub here to make it easy to do real authentication in the future. */ 173 QByteArray 174 VidaliaSettings::getAuthToken() 175 { 176 return QByteArray::fromBase64(value(SETTING_AUTH_TOKEN, 177 QByteArray(DEFAULT_AUTH_TOKEN)).toByteArray()); 178 } 179 180 /** Set the authentication token sent by the controller to Tor. */ 181 void 182 VidaliaSettings::setAuthToken(QByteArray token) 183 { 184 setValue(SETTING_AUTH_TOKEN, token.toBase64()); 185 } 186 -
trunk/src/config/vidaliasettings.h
r71 r85 74 74 quint16 getControlPort(); 75 75 void setControlPort(quint16 port); 76 77 /* Get and set Tor's authentication information */ 78 QByteArray getAuthToken(); 79 void setAuthToken(QByteArray token); 76 80 }; 77 81
