01: /*
02: * Title: Oyster Project
03: * Description: S/MIME email sending capabilities
04: * @Author Vladimir Radisic
05: * @Version 2.1.5
06: */
07:
08: package org.enhydra.oyster.der;
09:
10: import org.enhydra.oyster.exception.SMIMEException;
11:
12: /**
13: * DERInteger is primitive type of DER encoded object which represents boolean
14: * value in ASN.1 notation.
15: */
16: public class DERBoolean extends DERObject {
17:
18: /**
19: * Constructs the DER encoded boolean value
20: * @param b0 can be true or false.
21: * @exception SMIMEException thrown in super class constructor.
22: */
23: public DERBoolean(boolean b0) throws SMIMEException {
24: super (1);
25: byte[] temp = { 0x00 };
26: if (b0) {
27: temp[0] = (byte) 0xFF;
28: this.addContent(temp);
29: } else
30: this.addContent(temp);
31: }
32: }
|