01: /*
02: * Title: Oyster Project
03: * Description: S/MIME email sending capabilities
04: * @Author Vladimir Radisic
05: * @Version 2.1.6
06: */
07:
08: package org.enhydra.oyster.cms;
09:
10: import org.enhydra.oyster.exception.SMIMEException;
11: import org.enhydra.oyster.der.DEROctetString;
12:
13: /**
14: * DESede3CBCParameter is parameter used in Content Encryption Algorithm
15: * Identifier in CMS object for encrypted message, for DES_EDE3_CBC and DES
16: * algorithms. Parameter for those algorithms is made only from initialization
17: * vector. Key length is not important.<BR>
18: * <BR>
19: * DESede3CBCParameter ::= IV<BR>
20: * <BR>
21: * IV ::= OCTET STRING -- exactly 8 octets<BR>
22: */
23: public class DESede3CBCParameter extends DEROctetString {
24:
25: /**
26: * Constructor takes IV (Initialization Vector) as byte array
27: * @param iv0 Initialization Vector
28: * @exception SMIMEException if Initialization Vector - IV is not 8 bytes long.
29: * Also, it can be thrown from super class constructor.
30: */
31: public DESede3CBCParameter(byte[] iv0) throws SMIMEException {
32: super (iv0);
33: if (iv0.length != 8)
34: throw new SMIMEException(1012);
35: }
36: }
|