KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > oyster > cms > CertificateSerialNumber


1 /*
2  * Title: Oyster Project
3  * Description: S/MIME email sending capabilities
4  * @Author Vladimir Radisic
5  * @Version 2.1.5
6  */

7
8
9 package org.enhydra.oyster.cms;
10
11 import org.enhydra.oyster.exception.SMIMEException;
12 import org.enhydra.oyster.der.DERInteger;
13 import java.security.cert.X509Certificate JavaDoc;
14 import java.math.BigInteger JavaDoc;
15
16
17 /**
18  * CertificateSerialNumber class is DER encoded integer represented in ASN.1
19  * notation according to RFC2630.<BR>
20  * <BR>
21  * CertificateSerialNumber ::= INTEGER<BR>
22  */

23 public class CertificateSerialNumber extends DERInteger {
24
25 /**
26  * Construction with BigInteger type of data as input. This constructor is used
27  * for integer numbers larger than long Java type can provide
28  * @param integer0 data of type BigInteger.
29  * @exception SMIMEException thrown from super class constructor.
30  */

31   public CertificateSerialNumber (BigInteger JavaDoc integer0) throws SMIMEException
32   {
33     super(integer0);
34   }
35
36 /**
37  * Construction by extracting serial number from X509 certificate
38  * @param cert0 X509Certificate
39  * @exception SMIMEException thrown from super class constructor.
40  */

41   public CertificateSerialNumber (X509Certificate JavaDoc cert0) throws SMIMEException
42   {
43     super(cert0.getSerialNumber());
44   }
45
46 /**
47  * Construction with integer as input. This constructor is limited with
48  * dimension of Java type - long (from -9223372036854775808 to 9223372036854775807)
49  * @param longNumb0 data of type long
50  * @exception SMIMEException thrown from super class constructor.
51  */

52   public CertificateSerialNumber (long longNumb0) throws SMIMEException
53   {
54     super(longNumb0);
55   }
56 }
57
58
59
60
Popular Tags