< prev index next >

test/jdk/sun/security/ec/SignatureOffsets.java

Print this page

26 import java.security.SignatureException;
27 
28 /*
29  * @test
30  * @bug 8050374
31  * @key randomness
32  * @summary This test validates signature verification
33  *          Signature.verify(byte[], int, int). The test uses RandomFactory to
34  *          get random set of clear text data to sign. After the signature
35  *          generation, the test tries to verify signature with the above API
36  *          and passing in different signature offset (0, 33, 66, 99).
37  * @library /test/lib
38  * @build jdk.test.lib.RandomFactory
39  * @compile ../../../java/security/Signature/Offsets.java
40  * @run main SignatureOffsets SunEC NONEwithECDSA
41  * @run main SignatureOffsets SunEC SHA1withECDSA
42  * @run main SignatureOffsets SunEC SHA256withECDSA
43  * @run main SignatureOffsets SunEC SHA224withECDSA
44  * @run main SignatureOffsets SunEC SHA384withECDSA
45  * @run main SignatureOffsets SunEC SHA512withECDSA




46  */
47 public class SignatureOffsets {
48 
49     public static void main(String[] args) throws NoSuchAlgorithmException,
50             InvalidKeyException, SignatureException {
51         Offsets.main(args);
52     }
53 }

26 import java.security.SignatureException;
27 
28 /*
29  * @test
30  * @bug 8050374
31  * @key randomness
32  * @summary This test validates signature verification
33  *          Signature.verify(byte[], int, int). The test uses RandomFactory to
34  *          get random set of clear text data to sign. After the signature
35  *          generation, the test tries to verify signature with the above API
36  *          and passing in different signature offset (0, 33, 66, 99).
37  * @library /test/lib
38  * @build jdk.test.lib.RandomFactory
39  * @compile ../../../java/security/Signature/Offsets.java
40  * @run main SignatureOffsets SunEC NONEwithECDSA
41  * @run main SignatureOffsets SunEC SHA1withECDSA
42  * @run main SignatureOffsets SunEC SHA256withECDSA
43  * @run main SignatureOffsets SunEC SHA224withECDSA
44  * @run main SignatureOffsets SunEC SHA384withECDSA
45  * @run main SignatureOffsets SunEC SHA512withECDSA
46  * @run main SignatureOffsets SunEC SHA3-256withECDSA
47  * @run main SignatureOffsets SunEC SHA3-224withECDSA
48  * @run main SignatureOffsets SunEC SHA3-384withECDSA
49  * @run main SignatureOffsets SunEC SHA3-512withECDSA
50  */
51 public class SignatureOffsets {
52 
53     public static void main(String[] args) throws NoSuchAlgorithmException,
54             InvalidKeyException, SignatureException {
55         Offsets.main(args);
56     }
57 }
< prev index next >