9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 0000000
27 * @summary FlushBug
28 * @author Jan Luehe
29 */
30 import java.io.*;
31 import java.security.*;
32 import javax.crypto.*;
33 import javax.crypto.spec.*;
34 import com.sun.crypto.provider.SunJCE;
35
36 public class FlushBug {
37 public static void main(String[] args) throws Exception {
38
39 Provider prov = new com.sun.crypto.provider.SunJCE();
40 Security.addProvider(prov);
41
42 SecureRandom sr = new SecureRandom();
43
44 // Create new DES key.
45 KeyGenerator kg = KeyGenerator.getInstance("DES");
46 kg.init(sr);
47 Key key = kg.generateKey();
48
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 0000000
27 * @summary FlushBug
28 * @author Jan Luehe
29 * @key randomness
30 */
31 import java.io.*;
32 import java.security.*;
33 import javax.crypto.*;
34 import javax.crypto.spec.*;
35 import com.sun.crypto.provider.SunJCE;
36
37 public class FlushBug {
38 public static void main(String[] args) throws Exception {
39
40 Provider prov = new com.sun.crypto.provider.SunJCE();
41 Security.addProvider(prov);
42
43 SecureRandom sr = new SecureRandom();
44
45 // Create new DES key.
46 KeyGenerator kg = KeyGenerator.getInstance("DES");
47 kg.init(sr);
48 Key key = kg.generateKey();
49
|