Class SMIMEEnvelopedUtil


  • public class SMIMEEnvelopedUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SMIMEEnvelopedGenerator createGenerator​(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm)
      Utility method which will return an SMIMEEnvelopedGenerator or an SMIMEAuthEnvelopedGenerator as appropriate for the algorithm OID passed in.
      static org.bouncycastle.cms.RecipientInformationStore getRecipientInfos​(javax.mail.internet.MimeBodyPart message)
      Parse the passed in MimeMessage extracting the RecipientInfos from it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SMIMEEnvelopedUtil

        public SMIMEEnvelopedUtil()
    • Method Detail

      • getRecipientInfos

        public static org.bouncycastle.cms.RecipientInformationStore getRecipientInfos​(javax.mail.internet.MimeBodyPart message)
                                                                                throws javax.mail.MessagingException,
                                                                                       org.bouncycastle.cms.CMSException
        Parse the passed in MimeMessage extracting the RecipientInfos from it.
        Parameters:
        message - the message to be parsed.
        Returns:
        the RecipientInformation store for the passed in message.
        Throws:
        javax.mail.MessagingException
        org.bouncycastle.cms.CMSException
      • createGenerator

        public static SMIMEEnvelopedGenerator createGenerator​(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm)
        Utility method which will return an SMIMEEnvelopedGenerator or an SMIMEAuthEnvelopedGenerator as appropriate for the algorithm OID passed in.
        Parameters:
        algorithm - algorithm OID
        Returns:
        a SMIME Enveloped Generator class.