Bitcoin ABC
0.30.5
P2P Digital Currency
src
util
getuniquepath.cpp
Go to the documentation of this file.
1
#include <
random.h
>
2
#include <
util/fs.h
>
3
#include <
util/strencodings.h
>
4
5
fs::path
GetUniquePath
(
const
fs::path
&base) {
6
FastRandomContext
rnd;
7
fs::path
tmpFile = base /
HexStr
(rnd.
randbytes
(8));
8
return
tmpFile;
9
}
FastRandomContext
Fast randomness source.
Definition:
random.h:156
FastRandomContext::randbytes
std::vector< uint8_t > randbytes(size_t len)
Generate random bytes.
Definition:
random.cpp:690
fs::path
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Definition:
fs.h:30
fs.h
GetUniquePath
fs::path GetUniquePath(const fs::path &base)
Helper function for getting a unique path.
Definition:
getuniquepath.cpp:5
random.h
strencodings.h
HexStr
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
Definition:
strencodings.cpp:543
Generated on Wed Nov 20 2024 17:55:59 for Bitcoin ABC by
1.9.4