jdk/src/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java
changeset 15010 ec6b49ce42b1
parent 13672 604588823b5a
child 18809 97f5713a0f1a
equal deleted inserted replaced
15009:bcb241432928 15010:ec6b49ce42b1
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   138      *
   138      *
   139      * @return the new key pair
   139      * @return the new key pair
   140      */
   140      */
   141     public KeyPair generateKeyPair() {
   141     public KeyPair generateKeyPair() {
   142         if (random == null) {
   142         if (random == null) {
   143             random = SunJCE.RANDOM;
   143             random = SunJCE.getRandom();
   144         }
   144         }
   145 
   145 
   146         if (params == null) {
   146         if (params == null) {
   147             try {
   147             try {
   148                 params = ParameterCache.getDHParameterSpec(pSize, random);
   148                 params = ParameterCache.getDHParameterSpec(pSize, random);