Boost logo

Boost :

Subject: [boost] [Boost.Filesystem] unique_path uses a random number generator from the OS, correct?
From: Ben Fritz (benjamin.fritz_at_[hidden])
Date: 2015-01-09 14:29:32

The reference docs for unique_path state:

Remarks: Implementations are encouraged to obtain the required randomness
via a cryptographically secure pseudo-random number generator, such as one
provided by the operating system.

I'm confused by the "implementations are encouraged to" text. Isn't
Boost.Filesystem the implementation of unique_path? Specifically, it *looks
like* this is provided in unique_path.cpp which will use
either CryptGenRandom from the Windows API; or /dev/urandom or /dev/random
on POSIX systems.

This means the random number comes from system/OS utilities, and not Boost
itself, correct?

Ben Fritz

Boost list run by bdawes at, gregod at, cpdaniel at, john at