9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 * @author Gary Ellison 27 * @bug 4170635 28 * @summary Verify equals()/hashCode() contract honored 29 */ 30 31 import java.io.*; 32 33 import sun.security.x509.*; 34 import sun.security.pkcs.*; 35 36 37 public class EncryptedPKInfoEqualsHashCode { 38 39 public static void main(String[] args) throws Exception { 40 41 EncryptedPrivateKeyInfo ev1; 42 EncryptedPrivateKeyInfo ev2; 43 44 AlgorithmId dh = AlgorithmId.get("DH"); 45 46 byte key1[] = { 47 (byte)0xD4,(byte)0xA0,(byte)0xBA,(byte)0x02, 48 (byte)0x50,(byte)0xB6,(byte)0xFD,(byte)0x2E, | 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 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 * @author Gary Ellison 27 * @bug 4170635 28 * @summary Verify equals()/hashCode() contract honored 29 * @modules java.base/sun.security.pkcs 30 * java.base/sun.security.x509 31 */ 32 33 import java.io.*; 34 35 import sun.security.x509.*; 36 import sun.security.pkcs.*; 37 38 39 public class EncryptedPKInfoEqualsHashCode { 40 41 public static void main(String[] args) throws Exception { 42 43 EncryptedPrivateKeyInfo ev1; 44 EncryptedPrivateKeyInfo ev2; 45 46 AlgorithmId dh = AlgorithmId.get("DH"); 47 48 byte key1[] = { 49 (byte)0xD4,(byte)0xA0,(byte)0xBA,(byte)0x02, 50 (byte)0x50,(byte)0xB6,(byte)0xFD,(byte)0x2E, |