diff --git a/random.cpp b/random.cpp index 02be871..330604f 100644 --- a/random.cpp +++ b/random.cpp @@ -29,7 +29,7 @@ Random::Random() { } -std::vector Random::getRandom(unsigned int bytes) +std::vector Random::getRandom(unsigned int bytes) const { auto buffer = std::make_unique(bytes); int r = getrandom(buffer.get(), bytes, GRND_NONBLOCK); @@ -46,7 +46,7 @@ std::vector Random::getRandom(unsigned int bytes) } -std::string Random::getRandomHexString(unsigned int bytes) +std::string Random::getRandomHexString(unsigned int bytes) const { std::stringstream stream; diff --git a/random.h b/random.h index 9954fb2..b826b71 100644 --- a/random.h +++ b/random.h @@ -22,8 +22,8 @@ class Random { public: Random(); - std::string getRandomHexString(unsigned int bytes); - std::vector getRandom(unsigned int bytes); + std::string getRandomHexString(unsigned int bytes) const; + std::vector getRandom(unsigned int bytes) const; }; #endif // RANDOM_H