#include <time.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include "common.h"
#include <sstream>
#include <string>
#include "RioInterface.h"
Go to the source code of this file.
Functions | |
char * | encryptPassword (const char *pwd) |
string | float2string (float f) |
string | int2string (int i) |
string | short2Permission (short perm) |
char* encryptPassword | ( | const char * | pwd | ) |
Definition at line 113 of file common.cpp.
00114 { 00115 char * pass; 00116 00117 try 00118 { 00119 pass = (char *) malloc( strlen( pwd ) + 1 ); 00120 00121 sprintf( pass, "%s" , pwd ); 00122 for( unsigned int i = 0; i < strlen( pass ); i++ ) 00123 pass[ i ] = ((pass[ i ] & 0x0F) << 4) | ((pass[ i ] & 0xF0) >> 4); 00124 00125 return pass; 00126 } 00127 catch( bad_alloc &ba ) 00128 { 00129 return NULL; 00130 } 00131 }
string float2string | ( | float | f | ) |
Definition at line 133 of file common.cpp.
string int2string | ( | int | i | ) |
Definition at line 141 of file common.cpp.
string short2Permission | ( | short | perm | ) |
Definition at line 149 of file common.cpp.