/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 4893959
* @summary basic test for PBEWithSHA1AndDESede and
* PBEWithSHA1AndRC2_40
* @author Valerie Peng
*/
public class PKCS12CipherKAT {
private final static String INPUT = "12:34:56:78:90:ab:cd:ef:ab:cd:ef:12:34:56:78:90:fe:db:ca:09:87:65";
try {
int n = s.length();
StringReader r = new StringReader(s);
while (true) {
int b1 = nextNibble(r);
if (b1 < 0) {
break;
}
int b2 = nextNibble(r);
if (b2 < 0) {
throw new RuntimeException("Invalid string " + s);
}
}
return out.toByteArray();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public static byte[] b(String s) {
return parse(s);
}
while (true) {
if (ch == -1) {
return -1;
return ch - '0';
}
}
}
static abstract class Test {
}
private final byte[] plaintext;
private final byte[] ciphertext;
private final char[] password;
private final byte[] salt;
private final int ic;
this.ciphertext = ciphertext;
}
if (b == null) {
return "(null)";
}
for (int i = 0; i < b.length; i++) {
int k = b[i] & 0xff;
if (i != 0) {
}
}
}
}
throw new Exception("Re-encryption test failed");
}
}
}
}
b(salt), iterationCount);
}
"95:94:49:5a:a2:cf:c9:a5:bb:21:08:23:45:41:46:a3:9c:c5:84:da:b5:04:ae:1a"),
"ec:32:f4:68:29:29:8b:c8:55:75:cb:ac:a4:01:d9:9c:b3:27:d6:b6:9f:26:98:f1")
};
}
}
}
}