18 #include <gwenhywfar/inherit.h>
19 #include <gwenhywfar/debug.h>
20 #include <gwenhywfar/gui_be.h>
21 #include <gwenhywfar/i18n.h>
23 #include <gwenhywfar/text.h>
24 #include <gwenhywfar/mdigest.h>
25 #include <gwenhywfar/debug.h>
34 int CppGuiLinker::Print(
GWEN_GUI *gui,
46 return xgui->
print(docTitle, docType, descr, text, guiid);
51 int CppGuiLinker::GetPassword(
GWEN_GUI *gui,
66 return xgui->
getPassword(flags, token, title, text, buffer, minLen, maxLen, guiid);
71 int CppGuiLinker::SetPasswordStatus(
GWEN_GUI *gui,
87 int CppGuiLinker::CheckCert(
GWEN_GUI *gui,
102 int CppGuiLinker::LogHook(
GWEN_GUI *gui,
103 const char *logDomain,
111 return xgui->
logHook(logDomain, priority, s);
116 int CppGuiLinker::ExecDialog(
GWEN_GUI *gui,
130 int CppGuiLinker::OpenDialog(
GWEN_GUI *gui,
144 int CppGuiLinker::CloseDialog(
GWEN_GUI *gui,
157 int CppGuiLinker::RunDialog(
GWEN_GUI *gui,
171 int CppGuiLinker::GetFileName(
GWEN_GUI *gui,
175 const char *patterns,
184 return xgui->
getFileName(caption, fnt, flags, patterns, pathBuffer, guiid);
190 void CppGuiLinker::freeData(
void *bp,
void *p) {
193 DBG_NOTICE(0,
"CppGuiLinker: Freeing CppGui");
221 CppGuiLinker::freeData);
253 return _printFn(_gui, docTitle, docType, descr, text, guiid);
260 std::string CppGui::_getPasswordHash(
const char *token,
const char *pin) {
329 if (i>=minLen && i<=maxLen) {
330 memmove(buffer, s, i+1);
351 std::list<std::string>::iterator it;
354 s=_getPasswordHash(token, buffer);
355 for (it=_badPasswords.begin();
356 it!=_badPasswords.end();
372 "You entered the same PIN twice.\n"
373 "The PIN is marked as bad, do you want\n"
377 "You entered the same PIN twice."
380 "The PIN is marked as <b>bad</b>, "
381 "do you want to use it anyway?"
384 I18N(
"Use my input"),
390 _badPasswords.remove(s);
446 const char *patterns,
460 return _checkCertFn(_gui, cert, sio, guiid);
483 s=_getPasswordHash(token, pin);
485 std::list<std::string>::iterator it;
487 s=_getPasswordHash(token, pin);
488 for (it=_badPasswords.begin();
489 it!=_badPasswords.end();
497 _badPasswords.push_back(s);