<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
even if the case is with the current time not active. Is it an good
idea to define an fixed value<br>
for random generator under special conditions that are time
depending ?<br>
<br>
Gruß Thomas<br>
<br>
---<br>
<br>
package sun.security.ssl;<br>
<br>
RandomCookie(final SecureRandom sr) {<br>
final long ts0 = System.currentTimeMillis() / 1000L;<br>
int ts1;<br>
if(ts0 < Integer.MAX_VALUE) { ts1 = (int)ts0 ; }<br>
else <b> { ts1 = Integer.MAX_VALUE; }</b><br>
this.random_bytes = new byte[32];<br>
sr.nextBytes(this.random_bytes);<br>
this.random_bytes[0] = (byte)(ts1 >> 24);<br>
this.random_bytes[1] = (byte)(ts1 >> 16);<br>
this.random_bytes[2] = (byte)(ts1 >> 8);<br>
this.random_bytes[3] = (byte) ts1;<br>
}
</body>
</html>