/*#include <string.h>
#include <ctype.h>*/
char *strlwr(char *str)
{
  unsigned char *p = (unsigned char *)str;
  while (*p)
  {
    *p = tolower((unsigned char)*p);
    p++;
  }
  return str;
}

double round2(double value) {
   return round(value * 100) / 100.0;
}

double round1(double value) {
   return round(value * 10) / 10.0;
}

#ifdef ENABLE_FEATURE_SECRETS_ENCRYPTION
char* XORENC(char* in, char* key){
  // Brad @ pingturtle.com
  int insize = strlen(in);
  int keysize = strlen(key);
  for(int x=0; x<insize; x++){
    for(int i=0; i<keysize;i++){
      in[x]=(in[x]^key[i])^(x*i);
    }
  }
  return in;
}
#endif

char timeStringFromSeconds[14];
char* getTimeStringFromSeconds(unsigned int inSeconds) {
  unsigned int minutes, hours, seconds;
  minutes = inSeconds/60;
  hours = minutes/60;
  seconds = inSeconds - (hours*3600 + minutes*60);
  sprintf(timeStringFromSeconds, "%02u:%02u:%02u", hours, minutes, seconds);
  return timeStringFromSeconds;
}