* @brief Implementation of the iGenerator interface
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2012 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
hash.addData(inputString);
QByteArray result = hash.result().toBase64();
if (length > 0)
- return result.left(length);
- else
- return result;
+ result.resize(length);
+
+ if (flags & uint(ALPHANUMERIC)) {
+ // Convert all characters to alpha-numeric
+ for (int i = 0; i < result.size(); ++i) {
+ unsigned char c = result.at(i);
+ while (isalnum(c) == 0)
+ c++;
+ result[i] = c;
+ }
+ }
+
+ return result;
}
* @brief Version information for eVaf modules
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2012 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
/**
* Module/library version number in the form major,minor,release,build
*/
-#define VER_FILE_VERSION 0,1,1,1
+#define VER_FILE_VERSION 0,1,2,2
/**
* Module/library version number in the string format (shall end with \0)
*/
-#define VER_FILE_VERSION_STR "0.1.1.1\0"
+#define VER_FILE_VERSION_STR "0.1.2.2\0"
/**
* Module/library name (shall end with \0)