Home | History | Annotate | Download | only in rand.device

Lines Matching refs:token

22 // explicit random_device(const string& token = implementation-defined);
25 // value of the token parameter are implementation-defined". Implementations
40 bool is_valid_random_device(const std::string &token) {
43 return token == "/dev/urandom" || token == "/dev/random";
45 return token == "/dev/urandom";
49 void check_random_device_valid(const std::string &token) {
50 std::random_device r(token);
53 void check_random_device_invalid(const std::string &token) {
56 std::random_device r(token);
61 ((void)token);
71 std::string token = "wrong file";
72 check_random_device_invalid(token);
75 std::string token = "/dev/urandom";
76 if (is_valid_random_device(token))
77 check_random_device_valid(token);
79 check_random_device_invalid(token);
82 std::string token = "/dev/random";
83 if (is_valid_random_device(token))
84 check_random_device_valid(token);
86 check_random_device_invalid(token);