Adds support to AUTH_TYPE variable

This commit is contained in:
Felipe Zimmerle
2015-07-14 16:40:07 -03:00
parent d86427f1dd
commit 8c408ebcd7
5 changed files with 117 additions and 2 deletions

View File

@@ -26,7 +26,7 @@
#include <string>
#include <iostream>
#include <sstream>
#include <cstring>
#if defined _MSC_VER
#include <direct.h>
@@ -90,6 +90,18 @@ void chomp(std::string *str) {
}
std::string tolower(std::string str) {
std::locale loc;
std::string value;
for (std::string::size_type i=0; i < str.length(); ++i) {
value.assign(value + std::tolower(str[i], loc));
}
return value;
}
const char SAFE[256] = {
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,