1 7 8 9 package org.enhydra.oyster.cms; 10 11 import org.enhydra.oyster.exception.SMIMEException; 12 import org.enhydra.oyster.der.DERSequencePr; 13 14 15 38 public class EncryptedContentInfo extends DERSequencePr { 39 40 43 int orderIdentifier = 0; 44 45 51 public EncryptedContentInfo () throws SMIMEException 52 { 53 } 54 55 61 public void addContentType (byte[] contType0) throws SMIMEException { 62 if (orderIdentifier == 0) { 63 super.addContent(contType0); 64 orderIdentifier++; 65 } 66 else 67 throw new SMIMEException(this, 1018); 68 } 69 70 76 public void addEncryptAlgorithmID (byte[] alg0) throws SMIMEException { 77 if (orderIdentifier == 1) { 78 super.addContent(alg0); 79 orderIdentifier++; 80 } 81 else 82 throw new SMIMEException(this, 1018); 83 } 84 85 91 public void addEncryptContent (byte[] cont0) throws SMIMEException { 92 if (orderIdentifier == 2) { 93 super.addContent(cont0); 94 orderIdentifier++; 95 } 96 else 97 throw new SMIMEException(this, 1018); 98 } 99 } 100 101 102 103 | Popular Tags |