osb/source/core/StarSecureRandom_unix.cpp

11 lines
191 B
C++
Raw Normal View History

2023-06-20 04:33:09 +00:00
#include "StarSecureRandom.hpp"
#include "StarFile.hpp"
namespace Star {
ByteArray secureRandomBytes(size_t size) {
return File::open("/dev/urandom", IOMode::Read)->readBytes(size);
}
}