1 /*
2 * Title: S/MIME Project
3 * Description: S/MIME email sending capabilities
4 * @Author Vladimir Radisic
5 * @Version 2.0.1
6 */
7
8
9 package org.webdocwf.util.smime.cms;
10
11
12 import org.webdocwf.util.smime.exception.SMIMEException;
13 import org.webdocwf.util.smime.der.DERInteger;
14
15
16 /***
17 * CMSVersion class is DER encoded integer represented in ASN.1 notation
18 * according to RFC2630.<BR>
19 * <BR>
20 * CMSVersion ::= INTEGER { v0(0), v1(1), v2(2), v3(3), v4(4) }<BR>
21 */
22 public class CMSVersion extends DERInteger {
23
24 /***
25 * Construction is possible only for few discret integer values
26 * @param ver0 can be 0, 1, 2, 3 or 4
27 * @exception SMIMEException if parameter ver0 is not from group 0, 1, 2, 3 or 4.
28 * Also, it can be thrown from super class constructor.
29 */
30 public CMSVersion(int ver0) throws SMIMEException {
31 super(ver0);
32 if ((ver0 != 0) & (ver0 != 1) & (ver0 != 2) & (ver0 != 3) & (ver0 != 4))
33 throw new SMIMEException(this, 1019);
34 }
35 }
36
This page was automatically generated by Maven