[Cppcms-users] how to use cppcms::urandom_device to generate a random string and output it as a str
Brought to you by:
artyom-beilis
From: Zheng P. <ky...@gm...> - 2012-05-23 11:03:58
|
Hi, all: I am a green hand to cppcms. I want to generate a random string by using cppcms::urandom_device. my codes are: char buf[32]; cppcms::urandom_device random_device; random_device.generate(buf, 16); std::string output(buf); std::cout << output << std::endl; .... ... The above codes will output garbled codes, I don't know how to get readable random string by using cppcms::urandom_device, who can give me an advise? -- with kind regards |