This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: libjava seems to miss some files for win32


Kai Tietz wrote:

> 	* gnu/java/security/jce/prng/natVMSecureRandomWin32.cc: Implementation
> 	for native win32.
> 
> Tested for x86 and x64 mingw targets. Ok for apply?

+  for (a = 0; a < length; a++, count++)
+   *bytes++= (jbyte) rand ();

  Surely not, the standard C library rand() function is completely unsuitable
for security purposes.  It should use the win32 crypto api to get real
high-quality random data I think.

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]