< prev index next >

test/java/security/SecureRandom/DrbgParametersSpec.java

Print this page
rev 17325 : 8181761: add explicit @build actions for jdk.test.lib classes in all :tier2 tests
Reviewed-by: duke


   8  *
   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 /* @test
  25  * @bug 8051408 8158534
  26  * @summary Make sure DrbgParameters coded as specified
  27  * @library /test/lib


  28  */
  29 
  30 import jdk.test.lib.Asserts;
  31 
  32 import java.security.DrbgParameters;
  33 import java.util.Arrays;
  34 
  35 import static java.security.DrbgParameters.Capability.*;
  36 
  37 public class DrbgParametersSpec {
  38 
  39     public static void main(String args[]) throws Exception {
  40 
  41         byte[] p, np1, np2;
  42 
  43         // Capability
  44         Asserts.assertTrue(PR_AND_RESEED.supportsPredictionResistance());
  45         Asserts.assertTrue(PR_AND_RESEED.supportsReseeding());
  46         Asserts.assertFalse(RESEED_ONLY.supportsPredictionResistance());
  47         Asserts.assertTrue(RESEED_ONLY.supportsReseeding());




   8  *
   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 /* @test
  25  * @bug 8051408 8158534
  26  * @summary Make sure DrbgParameters coded as specified
  27  * @library /test/lib
  28  * @build jdk.test.lib.Asserts
  29  * @run main DrbgParametersSpec
  30  */
  31 
  32 import jdk.test.lib.Asserts;
  33 
  34 import java.security.DrbgParameters;
  35 import java.util.Arrays;
  36 
  37 import static java.security.DrbgParameters.Capability.*;
  38 
  39 public class DrbgParametersSpec {
  40 
  41     public static void main(String args[]) throws Exception {
  42 
  43         byte[] p, np1, np2;
  44 
  45         // Capability
  46         Asserts.assertTrue(PR_AND_RESEED.supportsPredictionResistance());
  47         Asserts.assertTrue(PR_AND_RESEED.supportsReseeding());
  48         Asserts.assertFalse(RESEED_ONLY.supportsPredictionResistance());
  49         Asserts.assertTrue(RESEED_ONLY.supportsReseeding());


< prev index next >