I am writing a Bittorrent Client in C++ and need to generate a 20 Byte Peer ID. The first 8 characters are comprised of -WW1000-
which represent the name of the client and the version number. The other 12 digits need to be a random number that need to be generated randomly every time the client starts.
How could I generate the 12 digit random number and concatenate it with a std::string
containing the first 8 characters (-WW1000-
)?