From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27708 invoked by alias); 11 Apr 2006 20:58:56 -0000 Received: (qmail 27653 invoked by uid 48); 11 Apr 2006 20:58:56 -0000 Date: Tue, 11 Apr 2006 20:58:00 -0000 Message-ID: <20060411205856.27652.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug classpath/24481] SecureRandom.setSeed has no impact In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "csm at gnu dot org" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q2/txt/msg00082.txt.bz2 List-Id: ------- Comment #7 from csm at gnu dot org 2006-04-11 20:58 ------- I'm not sure I understand your situation. Are you doing: SecureRandom r = new SecureRandom (); for (...) r.getBytes (...); // produces the same bytes each time Or for (...) { SecureRandom r = new SecureRandom (); r.getBytes (...); // produces the same bytes each time } I'd expect the second case to produce the same bytes on each iteration, but not the first case. Also, see bug 27111, which tracks the issue of SecureRandom instances not being seeded properly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24481