All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.sasn1.cms.ContentInfoParser Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java CMS and S/MIME APIs for handling the CMS and S/MIME protocols. This jar contains CMS and S/MIME APIs for JDK 1.5. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs. If the S/MIME API is used, the JavaMail API and the Java activation framework will also be needed.

There is a newer version: 1.46
Show newest version
package org.bouncycastle.sasn1.cms;

import org.bouncycastle.sasn1.Asn1Object;
import org.bouncycastle.sasn1.Asn1ObjectIdentifier;
import org.bouncycastle.sasn1.Asn1Sequence;
import org.bouncycastle.sasn1.Asn1TaggedObject;

import java.io.IOException;

/**
 * Produce an object suitable for an ASN1OutputStream.
 * 
 * ContentInfo ::= SEQUENCE {
 *          contentType ContentType,
 *          content
 *          [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
 * 
* @deprecated use corresponding class in org.bouncycastle.asn1.cms */ public class ContentInfoParser { private Asn1ObjectIdentifier contentType; private Asn1TaggedObject content; public ContentInfoParser( Asn1Sequence seq) throws IOException { contentType = (Asn1ObjectIdentifier)seq.readObject(); content = (Asn1TaggedObject)seq.readObject(); } public Asn1ObjectIdentifier getContentType() { return contentType; } public Asn1Object getContent( int tag) throws IOException { if (content != null) { return content.getObject(tag, true); } return null; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy