1 /* |
1 /* |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
123 byte[] p = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04 }; |
123 byte[] p = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04 }; |
124 status &= runTest("SHA-224", MGF1ParameterSpec.SHA224, p); |
124 status &= runTest("SHA-224", MGF1ParameterSpec.SHA224, p); |
125 status &= runTest("SHA-256", MGF1ParameterSpec.SHA256, p); |
125 status &= runTest("SHA-256", MGF1ParameterSpec.SHA256, p); |
126 status &= runTest("SHA-384", MGF1ParameterSpec.SHA384, p); |
126 status &= runTest("SHA-384", MGF1ParameterSpec.SHA384, p); |
127 status &= runTest("SHA-512", MGF1ParameterSpec.SHA512, p); |
127 status &= runTest("SHA-512", MGF1ParameterSpec.SHA512, p); |
|
128 status &= runTest("SHA-512/224", MGF1ParameterSpec.SHA512_224, p); |
|
129 status &= runTest("SHA-512/256", MGF1ParameterSpec.SHA512_256, p); |
128 status &= runTest("SHA", MGF1ParameterSpec.SHA1, new byte[0]); |
130 status &= runTest("SHA", MGF1ParameterSpec.SHA1, new byte[0]); |
129 status &= runTest("SHA-1", MGF1ParameterSpec.SHA1, new byte[0]); |
131 status &= runTest("SHA-1", MGF1ParameterSpec.SHA1, new byte[0]); |
130 status &= runTest("SHA1", MGF1ParameterSpec.SHA1, new byte[0]); |
132 status &= runTest("SHA1", MGF1ParameterSpec.SHA1, new byte[0]); |
131 if (status) { |
133 if (status) { |
132 System.out.println("Test Passed"); |
134 System.out.println("Test Passed"); |