Questions tagged [boost-uuid]

Boost.Uuid is a C++ library that provides an implementation of Universally Unique Identifiers.

Boost.Uuid is a C++ library that provides an implementation of Universally Unique Identifiers.

29 questions
1
vote
1 answer

boost::uuid / unique across different databases

I want to generate a uuid which should be used as unique identifier across different systems/databases. I read the examples but i don't understand how i can be sure that the generated id's are unique over different systems and databases. I hope you…
1
vote
1 answer

Parse boost uuids with boost spirit

I'm trying to write a boost::uuids::uuid parser with boost::spirit::qi in order to use it in a nice way with other qi parsers and to have a nice unified parser api. My first idea was to write a custom qi::grammar which would use…
Superlokkus
  • 4,731
  • 1
  • 25
  • 57
1
vote
1 answer

size of boost uuid in string returns 36

I am trying to generate 16 character uuid string using boost::uuid but it returns 36 characters. boost::uuids::uuid uid == boost::random_generator()(); std::cout << size of uid:" << uid.size << std::endl; //always 16 std::stringstream ss; ss<<…
rjoshi
  • 1,645
  • 1
  • 20
  • 31
1
vote
1 answer

Generate boost::uuids::uuid from boost::compute::detail::sha1

I am trying to generate boost::uuids::uuid from boost::compute::detail::sha1 in this way: #include #include "boost/uuid/uuid.hpp" #include "boost/uuid/uuid_io.hpp" #include "boost/uuid/string_generator.hpp" #include…
definename
  • 193
  • 1
  • 12
1
vote
2 answers

generate a boost.uuid from a boost.path string

I'm working in a manager class, that holds string representing paths. From this strings, I'd like to have a boost.uuid using a code like this: m_log->addMessage("Generating UUID from path",ZEL_APPENDER,LOGLEVEL_DEBUG); boost::uuids::string_generator…
Killrazor
  • 6,856
  • 15
  • 53
  • 69
1
vote
1 answer

Load boost::uuid from bytes in c++

I use .data() to get 16 bytes data array. Later I write it to a file and I want to load it back to a uuid variable. Should I just perform memory copy to the variable as : (c++11) boost::uuids::uuid uuid =…
SagiLow
  • 5,721
  • 9
  • 60
  • 115
1
vote
0 answers

Does the POD property of boost uuid allow me to pass it over a dll/so boundary?

Can I return boost uuids from a function call over the dll boundary? Does it matter if I return by value or by reference?
Mart
  • 135
  • 1
  • 10
1
vote
1 answer

How to generate uuid which will be the same for each seed string?

I am wondering how to get the same uuid by using the same seed string. Any idea?
Adam Lee
  • 24,710
  • 51
  • 156
  • 236
1
vote
1 answer

How to generate boost uuid from string at compile time

is there a way to generate a boost uuid from a string like 988A00C4-79F3-46f9-98CD-D5AD4AA2A0FE at compile time?
Tobias Langner
  • 10,634
  • 6
  • 46
  • 76
1
vote
1 answer

Generating uniformly distributed random numbers in distributed environment

I have to generate a "unique Random Number" in a Wireless sensor network which works on the principle of Gossiping. The requirements are: Each node has to generate a unique Random Number, without having any shared knowledge of what other nodes have…
0
votes
1 answer

Boost link UUID using CMake

I'm trying to include just the uuid part of the boost library into a project using CMake. This is the repo https://github.com/boostorg/uuid . When running cmake I get the following error: CMake Error at third-party/uuid/CMakeLists.txt:15…
yonutix
  • 1,964
  • 1
  • 22
  • 51
0
votes
1 answer

Boost::UUID setting specific value

In Java UUID Class there is a way to set upper and lower longs to create a specific value for UUID. UUID test(-1, -1); will generate UUID: ffffffff-ffff-ffff-ffff-ffffffffffff Is there a similar method to create one with BOOST UUID in C++ other…
Karlson
  • 2,958
  • 1
  • 21
  • 48
0
votes
0 answers

x86 intrinsics act weird in boost::uuids::operator <

I'm using boost::uuids inside maps (labeled_graph, actually), so I need a properly working operator <. Unfortunately it isn't, if BOOST_UUID_USE_SSE2 is enabled (and thus, uuid_x86.hpp is used). Here is example code: #include…
myaut
  • 11,174
  • 2
  • 30
  • 62
0
votes
1 answer

Are boost UUIDs generated using default mt19937 RNG secure for session IDs?

I need to generate UUIDs for use as non-predictable / guessable session IDs. This can easily be accomplished using boost's UUID library: boost::uuids::uuid newUUID() { static boost::uuids::random_generator gen; return gen(); } The returned UUID…
mgd
  • 4,114
  • 3
  • 23
  • 32
1
2