jdk/test/sun/security/pkcs11/Mac/MacSameTest.java
changeset 35379 1e8e336ef66b
parent 30046 cf2c86e1819e
child 40975 680639c9b307
equal deleted inserted replaced
35378:7e19fa0e4e5b 35379:1e8e336ef66b
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2016, 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.
     7  * published by the Free Software Foundation.
    34  * @test
    34  * @test
    35  * @bug 8048603
    35  * @bug 8048603
    36  * @summary Check if doFinal and update operation result in same Mac
    36  * @summary Check if doFinal and update operation result in same Mac
    37  * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin
    37  * @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin
    38  * @library ..
    38  * @library ..
    39  * @run main MacSameTest
    39  * @run main/othervm MacSameTest
       
    40  * @run main/othervm MacSameTest sm
    40  * @key randomness
    41  * @key randomness
    41  */
    42  */
    42 public class MacSameTest extends PKCS11Test {
    43 public class MacSameTest extends PKCS11Test {
    43 
    44 
    44     private static final int MESSAGE_SIZE = 25;
    45     private static final int MESSAGE_SIZE = 25;
    55      * Finally, compare result1 and result2 and see if they are the same.
    56      * Finally, compare result1 and result2 and see if they are the same.
    56      *
    57      *
    57      * @param args the command line arguments
    58      * @param args the command line arguments
    58      */
    59      */
    59     public static void main(String[] args) throws Exception {
    60     public static void main(String[] args) throws Exception {
    60         main(new MacSameTest());
    61         main(new MacSameTest(), args);
    61     }
    62     }
    62 
    63 
    63     @Override
    64     @Override
    64     public void main(Provider p) {
    65     public void main(Provider p) {
    65         List<String> algorithms = getSupportedAlgorithms("Mac", "Hmac", p);
    66         List<String> algorithms = getSupportedAlgorithms("Mac", "Hmac", p);