Lines Matching defs:random_device
43 random_device::random_device(const string& __token) {
48 random_device::~random_device() {}
50 unsigned random_device::operator()() {
55 __throw_system_error(errno, "random_device getentropy failed");
61 random_device::random_device(const string&) {}
63 random_device::~random_device() {}
65 unsigned random_device::operator()() { return arc4random(); }
69 random_device::random_device(const string& __token) : __f_(open(__token.c_str(), O_RDONLY)) {
71 __throw_system_error(errno, ("random_device failed to open " + __token).c_str());
74 random_device::~random_device() { close(__f_); }
76 unsigned random_device::operator()() {
83 __throw_system_error(ENOMSG, "random_device got EOF");
86 __throw_system_error(errno, "random_device got an unexpected error");
97 random_device::random_device(const string& __token) {
105 random_device::~random_device() {}
107 unsigned random_device::operator()() {
113 __throw_system_error(error, "random_device failed getting bytes");
115 __throw_runtime_error("random_device failed to obtain enough bytes");
121 random_device::random_device(const string& __token) {
126 random_device::~random_device() {}
128 unsigned random_device::operator()() {
132 __throw_system_error(err, "random_device rand_s failed.");
138 random_device::random_device(const string& __token) {
143 random_device::~random_device() {}
145 unsigned random_device::operator()() {
161 double random_device::entropy() const noexcept {