This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: libjava seems to miss some files for win32
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Andrew Haley <aph at redhat dot com>, gcc at gcc dot gnu dot org, java at gcc dot gnu dot org, Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Date: Sat, 18 Jul 2009 18:21:39 +0100
- Subject: Re: RFA: libjava seems to miss some files for win32
- References: <90baa01f0907180506h1a58152du5d45d66628043ad9@mail.gmail.com> <4A61D6D6.7030707@gmail.com> <90baa01f0907180901o4dc45cedx795f9cf5650af5ca@mail.gmail.com>
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