KickJava   Java API By Example, From Geeks To Geeks.

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


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.DEROctetString;
13
14
15 /**
16  * DESede3CBCParameter is parameter used in Content Encryption Algorithm
17  * Identifier in CMS object for encrypted message, for DES_EDE3_CBC and DES
18  * algorithms. Parameter for those algorithms is made only from initialization
19  * vector. Key length is not important.<BR>
20  * <BR>
21  * DESede3CBCParameter ::= IV<BR>
22  * <BR>
23  * IV ::= OCTET STRING -- exactly 8 octets<BR>
24  */

25 public class DESede3CBCParameter extends DEROctetString {
26
27 /**
28  * Constructor takes IV (Initialization Vector) as byte array
29  * @param iv0 Initialization Vector
30  * @exception SMIMEException if Initialization Vector - IV is not 8 bytes long.
31  * Also, it can be thrown from super class constructor.
32  */

33   public DESede3CBCParameter (byte[] iv0) throws SMIMEException
34   {
35     super(iv0);
36     if (iv0.length != 8)
37       throw new SMIMEException(this, 1012);
38   }
39 }
40
41
42
43
Popular Tags