diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-07 23:44:03 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-12-08 11:57:55 +0100 |
commit | c83b09ab19e72818f38266808e109efd0f1f64c0 (patch) | |
tree | 70cfcaa4dc128116677eae9d2c026ff6e7f518c1 /comphelper | |
parent | d46dc8e547810208287aab77f0313f1971901464 (diff) |
rtlRandomPool: remove pointless seeding with system time
Change-Id: I88647a66a72d092303560a4348ce3dc55ee6c321
Reviewed-on: https://gerrit.libreoffice.org/46055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/docpasswordhelper.cxx | 3 | ||||
-rw-r--r-- | comphelper/source/misc/storagehelper.cxx | 4 |
2 files changed, 0 insertions, 7 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 7d761bb9c740..79af2be034d6 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -248,10 +248,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence( { uno::Sequence< sal_Int8 > aResult( nLength ); - TimeValue aTime; - osl_getSystemTime( &aTime ); rtlRandomPool aRandomPool = rtl_random_createPool (); - rtl_random_addBytes ( aRandomPool, &aTime, 8 ); rtl_random_getBytes ( aRandomPool, aResult.getArray(), nLength ); rtl_random_destroyPool ( aRandomPool ); diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index d51055211e8a..a6f2109ba37e 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -436,11 +436,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreateGpgPackageEncryptionDat // generate session key // -------------------- - // Get a random number generator and seed it with current timestamp - TimeValue aTime; - osl_getSystemTime( &aTime ); rtlRandomPool aRandomPool = rtl_random_createPool(); - rtl_random_addBytes(aRandomPool, &aTime, 8); // get 16 random chars out of it uno::Sequence < sal_Int8 > aVector(16); |