File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
test/jdk/sun/security/provider/SecureRandom Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2828
2929/**
3030 * @test
31- * @bug 8154523
31+ * @bug 8154523 8247895
3232 * @summary SHA1PRNG output should change after setSeed
3333 */
3434public class SHA1PRNGReseed {
3535
3636 public static void main (String [] args ) throws Exception {
3737 SecureRandom sr = SecureRandom .getInstance ("SHA1PRNG" );
38- sr .setSeed (0 );
38+ sr .setSeed (1 );
3939 sr .nextInt ();
4040
4141 ByteArrayOutputStream bout = new ByteArrayOutputStream ();
@@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception {
4545 new ByteArrayInputStream (bout .toByteArray ())).readObject ();
4646
4747 int i1 = sr .nextInt ();
48- sr2 .setSeed (1 );
48+ sr2 .setSeed (2 );
4949 int i2 = sr2 .nextInt ();
5050
5151 if (i1 == i2 ) {
You can’t perform that action at this time.
0 commit comments