Branch data Line data Source code
# 1 : : #include <random.h> # 2 : : #include <fs.h> # 3 : : #include <util/strencodings.h> # 4 : : # 5 : : fs::path GetUniquePath(const fs::path& base) # 6 : 1337 : { # 7 : 1337 : FastRandomContext rnd; # 8 : 1337 : fs::path tmpFile = base / HexStr(rnd.randbytes(8)); # 9 : 1337 : return tmpFile; # 10 : 1337 : }