use system randomness by default unless overridden
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <phosg/Encoding.hh>
|
||||
#include <phosg/Random.hh>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -342,3 +343,7 @@ std::string encrypt_pr2_data(const std::string& data, size_t decompressed_size,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline uint32_t random_from_optional_crypt(std::shared_ptr<PSOLFGEncryption> random_crypt) {
|
||||
return random_crypt ? random_crypt->next() : random_object<uint32_t>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user