uuid_str.C 281 Bytes
Newer Older
1
#if USE_UUID
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <uuid/uuid.h>
#include "uuid_str.h"
using namespace std;

std::string uuid_str(void)
{
  unsigned char uuid_c[16];
  char s[36];

  // generate uuid
  uuid_generate_time(uuid_c);

  // convert to string
  uuid_unparse(uuid_c,s);

  return string(s);
}
19
#endif