mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
14 lines
409 B
C++
14 lines
409 B
C++
// Copyright (c) 2021 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <random.h>
|
|
#include <fs.h>
|
|
#include <util/strencodings.h>
|
|
|
|
fs::path GetUniquePath(const fs::path& base)
|
|
{
|
|
FastRandomContext rnd;
|
|
fs::path tmpFile = base / HexStr(rnd.randbytes(8));
|
|
return tmpFile;
|
|
} |