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.der;
10  
11  
12  import  org.webdocwf.util.smime.exception.SMIMEException;
13  
14  
15  /***
16   * DERInteger is primitive type of DER encoded object which represents boolean
17   * value in ASN.1 notation.
18   */
19  public class DERBoolean extends DERObject {
20  
21      /***
22       * Constructs the DER encoded boolean value
23       * @param b0 can be true or false.
24       * @exception SMIMEException thrown in super class constructor.
25       */
26      public DERBoolean(boolean b0) throws SMIMEException {
27          super(1);
28          byte[] temp = {
29                  0x00
30              };
31  
32          if (b0) {
33              temp[0] = (byte) 0xFF;
34              this.addContent(temp);
35          } else
36              this.addContent(temp);
37      }
38  }
39  
This page was automatically generated by Maven