TestSymmCiphers.java revision 3645
3645N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 149N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 320N/A * This code is free software; you can redistribute it and/or modify it 320N/A * under the terms of the GNU General Public License version 2 only, as 149N/A * published by the Free Software Foundation. 320N/A * This code is distributed in the hope that it will be useful, but WITHOUT 320N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 320N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 320N/A * version 2 for more details (a copy is included in the LICENSE file that 149N/A * accompanied this code). 320N/A * You should have received a copy of the GNU General Public License version 320N/A * 2 along with this work; if not, write to the Free Software Foundation, 149N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 149N/A * @summary basic test for symmetric ciphers with padding 149N/A private static class CI {
// class for holding Cipher Information 149N/A new CI(
"ARCFOUR",
"ARCFOUR",
400),
149N/A // NSS reports CKR_DEVICE_ERROR when the data passed to 149N/A // print out debug info when exception is encountered 149N/A //debugOut("Estimated output size = " + outLen + "\n"); 149N/A // test data preparation 149N/A // test#1: byte[] in + byte[] out 149N/A //debugOut("Test#1:\n"); 149N/A // test#2: Non-direct Buffer in + non-direct Buffer out 149N/A //debugOut("Test#2:\n"); 149N/A //debugOut("inputBuf: " + inBuf + "\n"); 149N/A //debugOut("outputBuf: " + outBuf + "\n"); 149N/A // test#3: Direct Buffer in + direc Buffer out 149N/A //debugOut("Test#3:\n"); 149N/A //debugOut("(pre) inputBuf: " + inDirectBuf + "\n"); 149N/A //debugOut("(pre) outputBuf: " + outDirectBuf + "\n"); 149N/A //debugOut("(post) inputBuf: " + inDirectBuf + "\n"); 149N/A //debugOut("(post) outputBuf: " + outDirectBuf + "\n"); 149N/A // test#4: Direct Buffer in + non-direct Buffer out 149N/A //debugOut("Test#4:\n"); 149N/A //debugOut("inputBuf: " + inDirectBuf + "\n"); 149N/A //debugOut("outputBuf: " + outBuf + "\n"); 149N/A // test#5: Non-direct Buffer in + direct Buffer out 149N/A //debugOut("Test#5:\n"); 149N/A //debugOut("(pre) inputBuf: " + inBuf + "\n"); 149N/A //debugOut("(pre) outputBuf: " + outDirectBuf + "\n"); 149N/A //debugOut("(post) inputBuf: " + inBuf + "\n"); 149N/A //debugOut("(post) outputBuf: " + outDirectBuf + "\n");