1 /* $Id: TestMD5.java,v 1.3 2001/06/25 15:41:13 gelderen Exp $ 2 * 3 * Copyright (C) 1995-1999 The Cryptix Foundation Limited. 4 * All rights reserved. 5 * 6 * Use, modification, copying and distribution of this software is subject 7 * the terms and conditions of the Cryptix General Licence. You should have 8 * received a copy of the Cryptix General Licence along with this library; 9 * if not, you can download a copy from http://www.cryptix.org/ . 10 */ 11 package cryptix.jce.test; 12 13 14 final class TestMD5 15 extends MessageDigestTest 16 { 17 private static final String NAME="MD5"; 18 19 String[][] TEST_VALUES = 20 { 21 // data, md 22 // ...................... 23 {"", "d41d8cd98f00b204e9800998ecf8427e"}, // A.5 1 24 {"a", "0cc175b9c0f1b6a831c399e269772661"}, 25 {"abc", "900150983cd24fb0d6963f7d28e17f72"}, // A.5 3 26 {"message digest", "f96b697d7cb7938d525a2f31aaf161d0"}, // A.5 4 27 {"abcdefghijklmnopqrstuvwxyz", 28 "c3fcd3d76192e4007dfb496cca67e13b"}, // A.5 5 29 {"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 30 "d174ab98d277d9f5a5611c2c9f419d9f"}, // A.5 6 31 {"12345678901234567890123456789012345678901234567890"+ 32 "123456789012345678901234567890", 33 "57edf4a22be3c955ac49da2e2107b67a"} // A.5 7 34 }; 35 36 TestMD5()37 protected TestMD5() 38 { 39 super(NAME); 40 } 41 42 doIt()43 protected void doIt() 44 throws Exception 45 { 46 testExistence(NAME); 47 testValues(NAME, TEST_VALUES); 48 testCloning(NAME); 49 } 50 } 51