#include "stdpam.h" #include #include using namespace std; string StdPam::promptEchoOn(string msg) { if (msg == "login: ") cout << "Login: " ; else cout << __FUNCTION__ << " = " << msg << ": "; char buf[128]; cin.getline(buf,128); string input = string(buf); if (input.size() == 0) input = " "; return input; } string StdPam::promptEchoOff(string msg) { if (msg == "Password: ") cout << msg ; else cout << __FUNCTION__ << " = " << msg << ": "; string input = getpass(""); if (input.size() == 0) input = " "; return input; } void StdPam::errorMsg(string msg) { cout << __FUNCTION__ << " : " << msg << endl; } void StdPam::textInfo(string msg) { cout << __FUNCTION__ << " : " << msg << endl; }