sfx2: Metadata has no need for cryptographic randomness
Change-Id: I911c15c0ea7a3cae0269c67d8bd6fd79e9b6d8c6
This commit is contained in:
@@ -24,8 +24,7 @@
|
|||||||
#include <osl/mutex.hxx>
|
#include <osl/mutex.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
|
|
||||||
#include <rtl/random.h>
|
#include <comphelper/random.hxx>
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <list>
|
#include <list>
|
||||||
@@ -406,12 +405,11 @@ template< typename T >
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static rtlRandomPool s_Pool( rtl_random_createPool() );
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
sal_Int32 n;
|
unsigned int const n(comphelper::rng::uniform_uint_distribution(0,
|
||||||
rtl_random_getBytes(s_Pool, & n, sizeof(n));
|
std::numeric_limits<unsigned int>::max()));
|
||||||
id = prefix + OUString::number(abs(n));
|
id = prefix + OUString::number(n);
|
||||||
iter = i_rXmlIdMap.find(id);
|
iter = i_rXmlIdMap.find(id);
|
||||||
}
|
}
|
||||||
while (iter != i_rXmlIdMap.end());
|
while (iter != i_rXmlIdMap.end());
|
||||||
|
Reference in New Issue
Block a user