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 8012637
27 * @library ../UTIL
28 * @build TestUtil
29 * @run main TestCICOWithGCM
30 * @summary Test CipherInputStream/OutputStream with AES GCM mode.
31 * @author Valerie Peng
32 */
33
34 import java.security.*;
35 import javax.crypto.*;
36 import javax.crypto.spec.*;
37 import java.math.*;
38 import java.io.*;
39 import com.sun.crypto.provider.*;
40
41 import java.util.*;
42
43 public class TestCICOWithGCM {
44 public static void main(String[] args) throws Exception {
45 //init Secret Key
46 KeyGenerator kg = KeyGenerator.getInstance("AES", "SunJCE");
47 kg.init(128);
48 SecretKey key = kg.generateKey();
49
50 //do initialization of the plainText
51 byte[] plainText = new byte[800];
|
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 8012637
27 * @library ../UTIL
28 * @build TestUtil
29 * @run main TestCICOWithGCM
30 * @summary Test CipherInputStream/OutputStream with AES GCM mode.
31 * @author Valerie Peng
32 * @key randomness
33 */
34
35 import java.security.*;
36 import javax.crypto.*;
37 import javax.crypto.spec.*;
38 import java.math.*;
39 import java.io.*;
40 import com.sun.crypto.provider.*;
41
42 import java.util.*;
43
44 public class TestCICOWithGCM {
45 public static void main(String[] args) throws Exception {
46 //init Secret Key
47 KeyGenerator kg = KeyGenerator.getInstance("AES", "SunJCE");
48 kg.init(128);
49 SecretKey key = kg.generateKey();
50
51 //do initialization of the plainText
52 byte[] plainText = new byte[800];
|