bcpkix-jdk15on-147

rProvider paramDigestCalculatorProvider)
  {
    builder = new SignerInfoGeneratorBuilder(paramDigestCalculatorProvider);
  }
  
  public JcaSignerInfoGeneratorBuilder setDirectSignature(boolean paramBoolean)
  {
    builder.setDirectSignature(paramBoolean);
    return this;
  }
  
  public JcaSignerInfoGeneratorBuilder setSignedAttributeGenerator(CMSAttributeTableGenerator paramCMSAttributeTableGenerator)
  {
    builder.setSignedAttributeGenerator(paramCMSAttributeTableGenerator);
    return this;
  }
  
  public JcaSignerInfoGeneratorBuilder setUnsignedAttributeGenerator(CMSAttributeTableGenerator paramCMSAttributeTableGenerator)
  {
    builder.setUnsignedAttributeGenerator(paramCMSAttributeTableGenerator);
    return this;
  }
  
  public SignerInfoGenerator build(ContentSigner paramContentSigner, X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException
  {
    return builder.build(paramContentSigner, paramX509CertificateHolder);
  }
  
  public SignerInfoGenerator build(ContentSigner paramContentSigner, byte[] paramArrayOfByte)
    throws OperatorCreationException
  {
    return builder.build(paramContentSigner, paramArrayOfByte);
  }
  
  public SignerInfoGenerator build(ContentSigner paramContentSigner, X509Certificate paramX509Certificate)
    throws OperatorCreationException, CertificateEncodingException
  {
    return build(paramContentSigner, new JcaX509CertificateHolder(paramX509Certificate));
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSignerInfoGeneratorBuilder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

class JcaSignerInfoVerifierBuilder$1 {}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSignerInfoVerifierBuilder.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSignerInfoVerifierBuilder$Helper
{
  private JcaSignerInfoVerifierBuilder$Helper(JcaSignerInfoVerifierBuilder paramJcaSignerInfoVerifierBuilder) {}
  
  ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().build(paramPublicKey);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().build(paramX509Certificate);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new JcaContentVerifierProviderBuilder().build(paramX509CertificateHolder);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().build();
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSignerInfoVerifierBuilder.Helper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSignerInfoVerifierBuilder$NamedHelper
  extends JcaSignerInfoVerifierBuilder.Helper
{
  private final String providerName;
  
  public JcaSignerInfoVerifierBuilder$NamedHelper(JcaSignerInfoVerifierBuilder paramJcaSignerInfoVerifierBuilder, String paramString)
  {
    super(paramJcaSignerInfoVerifierBuilder, null);
    providerName = paramString;
  }
  
  ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramPublicKey);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509Certificate);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().setProvider(providerName).build();
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509CertificateHolder);
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSignerInfoVerifierBuilder.NamedHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.Provider;
import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSignerInfoVerifierBuilder$ProviderHelper
  extends JcaSignerInfoVerifierBuilder.Helper
{
  private final Provider provider;
  
  public JcaSignerInfoVerifierBuilder$ProviderHelper(JcaSignerInfoVerifierBuilder paramJcaSignerInfoVerifierBuilder, Provider paramProvider)
  {
    super(paramJcaSignerInfoVerifierBuilder, null);
    provider = paramProvider;
  }
  
  ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramPublicKey);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509Certificate);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().setProvider(provider).build();
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509CertificateHolder);
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSignerInfoVerifierBuilder.ProviderHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.Provider;
import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cms.CMSSignatureAlgorithmNameGenerator;
import org.bouncycastle.cms.DefaultCMSSignatureAlgorithmNameGenerator;
import org.bouncycastle.cms.SignerInformationVerifier;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.SignatureAlgorithmIdentifierFinder;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

public class JcaSignerInfoVerifierBuilder
{
  private Helper helper = new Helper(null);
  private DigestCalculatorProvider digestProvider;
  private CMSSignatureAlgorithmNameGenerator sigAlgNameGen = new DefaultCMSSignatureAlgorithmNameGenerator();
  private SignatureAlgorithmIdentifierFinder sigAlgIDFinder = new DefaultSignatureAlgorithmIdentifierFinder();
  
  public JcaSignerInfoVerifierBuilder(DigestCalculatorProvider paramDigestCalculatorProvider)
  {
    digestProvider = paramDigestCalculatorProvider;
  }
  
  public JcaSignerInfoVerifierBuilder setProvider(Provider paramProvider)
  {
    helper = new ProviderHelper(paramProvider);
    return this;
  }
  
  public JcaSignerInfoVerifierBuilder setProvider(String paramString)
  {
    helper = new NamedHelper(paramString);
    return this;
  }
  
  public JcaSignerInfoVerifierBuilder setSignatureAlgorithmNameGenerator(CMSSignatureAlgorithmNameGenerator paramCMSSignatureAlgorithmNameGenerator)
  {
    sigAlgNameGen = paramCMSSignatureAlgorithmNameGenerator;
    return this;
  }
  
  public JcaSignerInfoVerifierBuilder setSignatureAlgorithmFinder(SignatureAlgorithmIdentifierFinder paramSignatureAlgorithmIdentifierFinder)
  {
    sigAlgIDFinder = paramSignatureAlgorithmIdentifierFinder;
    return this;
  }
  
  public SignerInformationVerifier build(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new SignerInformationVerifier(sigAlgNameGen, sigAlgIDFinder, helper.createContentVerifierProvider(paramX509CertificateHolder), digestProvider);
  }
  
  public SignerInformationVerifier build(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new SignerInformationVerifier(sigAlgNameGen, sigAlgIDFinder, helper.createContentVerifierProvider(paramX509Certificate), digestProvider);
  }
  
  public SignerInformationVerifier build(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new SignerInformationVerifier(sigAlgNameGen, sigAlgIDFinder, helper.createContentVerifierProvider(paramPublicKey), digestProvider);
  }
  
  private class Helper
  {
    private Helper() {}
    
    ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().build(paramPublicKey);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().build(paramX509Certificate);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
      throws OperatorCreationException, CertificateException
    {
      return new JcaContentVerifierProviderBuilder().build(paramX509CertificateHolder);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().build();
    }
  }
  
  private class NamedHelper
    extends JcaSignerInfoVerifierBuilder.Helper
  {
    private final String providerName;
    
    public NamedHelper(String paramString)
    {
      super(null);
      providerName = paramString;
    }
    
    ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramPublicKey);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509Certificate);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().setProvider(providerName).build();
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
      throws OperatorCreationException, CertificateException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509CertificateHolder);
    }
  }
  
  private class ProviderHelper
    extends JcaSignerInfoVerifierBuilder.Helper
  {
    private final Provider provider;
    
    public ProviderHelper(Provider paramProvider)
    {
      super(null);
      provider = paramProvider;
    }
    
    ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramPublicKey);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509Certificate);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().setProvider(provider).build();
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
      throws OperatorCreationException, CertificateException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509CertificateHolder);
    }
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSignerInfoVerifierBuilder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

class JcaSimpleSignerInfoGeneratorBuilder$1 {}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PrivateKey;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSimpleSignerInfoGeneratorBuilder$Helper
{
  private JcaSimpleSignerInfoGeneratorBuilder$Helper(JcaSimpleSignerInfoGeneratorBuilder paramJcaSimpleSignerInfoGeneratorBuilder) {}
  
  ContentSigner createContentSigner(String paramString, PrivateKey paramPrivateKey)
    throws OperatorCreationException
  {
    return new JcaContentSignerBuilder(paramString).build(paramPrivateKey);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().build();
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder.Helper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PrivateKey;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSimpleSignerInfoGeneratorBuilder$NamedHelper
  extends JcaSimpleSignerInfoGeneratorBuilder.Helper
{
  private final String providerName;
  
  public JcaSimpleSignerInfoGeneratorBuilder$NamedHelper(JcaSimpleSignerInfoGeneratorBuilder paramJcaSimpleSignerInfoGeneratorBuilder, String paramString)
  {
    super(paramJcaSimpleSignerInfoGeneratorBuilder, null);
    providerName = paramString;
  }
  
  ContentSigner createContentSigner(String paramString, PrivateKey paramPrivateKey)
    throws OperatorCreationException
  {
    return new JcaContentSignerBuilder(paramString).setProvider(providerName).build(paramPrivateKey);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().setProvider(providerName).build();
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder.NamedHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PrivateKey;
import java.security.Provider;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSimpleSignerInfoGeneratorBuilder$ProviderHelper
  extends JcaSimpleSignerInfoGeneratorBuilder.Helper
{
  private final Provider provider;
  
  public JcaSimpleSignerInfoGeneratorBuilder$ProviderHelper(JcaSimpleSignerInfoGeneratorBuilder paramJcaSimpleSignerInfoGeneratorBuilder, Provider paramProvider)
  {
    super(paramJcaSimpleSignerInfoGeneratorBuilder, null);
    provider = paramProvider;
  }
  
  ContentSigner createContentSigner(String paramString, PrivateKey paramPrivateKey)
    throws OperatorCreationException
  {
    return new JcaContentSignerBuilder(paramString).setProvider(provider).build(paramPrivateKey);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().setProvider(provider).build();
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder.ProviderHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PrivateKey;
import java.security.Provider;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import org.bouncycastle.asn1.cms.AttributeTable;
import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder;
import org.bouncycastle.cms.CMSAttributeTableGenerator;
import org.bouncycastle.cms.DefaultSignedAttributeTableGenerator;
import org.bouncycastle.cms.SignerInfoGenerator;
import org.bouncycastle.cms.SignerInfoGeneratorBuilder;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

public class JcaSimpleSignerInfoGeneratorBuilder
{
  private Helper helper = new Helper(null);
  private boolean hasNoSignedAttributes;
  private CMSAttributeTableGenerator signedGen;
  private CMSAttributeTableGenerator unsignedGen;
  
  public JcaSimpleSignerInfoGeneratorBuilder()
    throws OperatorCreationException
  {}
  
  public JcaSimpleSignerInfoGeneratorBuilder setProvider(String paramString)
    throws OperatorCreationException
  {
    helper = new NamedHelper(paramString);
    return this;
  }
  
  public JcaSimpleSignerInfoGeneratorBuilder setProvider(Provider paramProvider)
    throws OperatorCreationException
  {
    helper = new ProviderHelper(paramProvider);
    return this;
  }
  
  public JcaSimpleSignerInfoGeneratorBuilder setDirectSignature(boolean paramBoolean)
  {
    hasNoSignedAttributes = paramBoolean;
    return this;
  }
  
  public JcaSimpleSignerInfoGeneratorBuilder setSignedAttributeGenerator(CMSAttributeTableGenerator paramCMSAttributeTableGenerator)
  {
    signedGen = paramCMSAttributeTableGenerator;
    return this;
  }
  
  public JcaSimpleSignerInfoGeneratorBuilder setSignedAttributeGenerator(AttributeTable paramAttributeTable)
  {
    signedGen = new DefaultSignedAttributeTableGenerator(paramAttributeTable);
    return this;
  }
  
  public JcaSimpleSignerInfoGeneratorBuilder setUnsignedAttributeGenerator(CMSAttributeTableGenerator paramCMSAttributeTableGenerator)
  {
    unsignedGen = paramCMSAttributeTableGenerator;
    return this;
  }
  
  public SignerInfoGenerator build(String paramString, PrivateKey paramPrivateKey, X509Certificate paramX509Certificate)
    throws OperatorCreationException, CertificateEncodingException
  {
    ContentSigner localContentSigner = helper.createContentSigner(paramString, paramPrivateKey);
    return configureAndBuild().build(localContentSigner, new JcaX509CertificateHolder(paramX509Certificate));
  }
  
  public SignerInfoGenerator build(String paramString, PrivateKey paramPrivateKey, byte[] paramArrayOfByte)
    throws OperatorCreationException, CertificateEncodingException
  {
    ContentSigner localContentSigner = helper.createContentSigner(paramString, paramPrivateKey);
    return configureAndBuild().build(localContentSigner, paramArrayOfByte);
  }
  
  private SignerInfoGeneratorBuilder configureAndBuild()
    throws OperatorCreationException
  {
    SignerInfoGeneratorBuilder localSignerInfoGeneratorBuilder = new SignerInfoGeneratorBuilder(helper.createDigestCalculatorProvider());
    localSignerInfoGeneratorBuilder.setDirectSignature(hasNoSignedAttributes);
    localSignerInfoGeneratorBuilder.setSignedAttributeGenerator(signedGen);
    localSignerInfoGeneratorBuilder.setUnsignedAttributeGenerator(unsignedGen);
    return localSignerInfoGeneratorBuilder;
  }
  
  private class Helper
  {
    private Helper() {}
    
    ContentSigner createContentSigner(String paramString, PrivateKey paramPrivateKey)
      throws OperatorCreationException
    {
      return new JcaContentSignerBuilder(paramString).build(paramPrivateKey);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().build();
    }
  }
  
  private class NamedHelper
    extends JcaSimpleSignerInfoGeneratorBuilder.Helper
  {
    private final String providerName;
    
    public NamedHelper(String paramString)
    {
      super(null);
      providerName = paramString;
    }
    
    ContentSigner createContentSigner(String paramString, PrivateKey paramPrivateKey)
      throws OperatorCreationException
    {
      return new JcaContentSignerBuilder(paramString).setProvider(providerName).build(paramPrivateKey);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().setProvider(providerName).build();
    }
  }
  
  private class ProviderHelper
    extends JcaSimpleSignerInfoGeneratorBuilder.Helper
  {
    private final Provider provider;
    
    public ProviderHelper(Provider paramProvider)
    {
      super(null);
      provider = paramProvider;
    }
    
    ContentSigner createContentSigner(String paramString, PrivateKey paramPrivateKey)
      throws OperatorCreationException
    {
      return new JcaContentSignerBuilder(paramString).setProvider(provider).build(paramPrivateKey);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().setProvider(provider).build();
    }
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

class JcaSimpleSignerInfoVerifierBuilder$1 {}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoVerifierBuilder.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSimpleSignerInfoVerifierBuilder$Helper
{
  private JcaSimpleSignerInfoVerifierBuilder$Helper(JcaSimpleSignerInfoVerifierBuilder paramJcaSimpleSignerInfoVerifierBuilder) {}
  
  ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().build(paramPublicKey);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().build(paramX509Certificate);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new JcaContentVerifierProviderBuilder().build(paramX509CertificateHolder);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().build();
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoVerifierBuilder.Helper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSimpleSignerInfoVerifierBuilder$NamedHelper
  extends JcaSimpleSignerInfoVerifierBuilder.Helper
{
  private final String providerName;
  
  public JcaSimpleSignerInfoVerifierBuilder$NamedHelper(JcaSimpleSignerInfoVerifierBuilder paramJcaSimpleSignerInfoVerifierBuilder, String paramString)
  {
    super(paramJcaSimpleSignerInfoVerifierBuilder, null);
    providerName = paramString;
  }
  
  ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramPublicKey);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509Certificate);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().setProvider(providerName).build();
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509CertificateHolder);
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoVerifierBuilder.NamedHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.Provider;
import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

class JcaSimpleSignerInfoVerifierBuilder$ProviderHelper
  extends JcaSimpleSignerInfoVerifierBuilder.Helper
{
  private final Provider provider;
  
  public JcaSimpleSignerInfoVerifierBuilder$ProviderHelper(JcaSimpleSignerInfoVerifierBuilder paramJcaSimpleSignerInfoVerifierBuilder, Provider paramProvider)
  {
    super(paramJcaSimpleSignerInfoVerifierBuilder, null);
    provider = paramProvider;
  }
  
  ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramPublicKey);
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509Certificate);
  }
  
  DigestCalculatorProvider createDigestCalculatorProvider()
    throws OperatorCreationException
  {
    return new JcaDigestCalculatorProviderBuilder().setProvider(provider).build();
  }
  
  ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509CertificateHolder);
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoVerifierBuilder.ProviderHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.Provider;
import java.security.PublicKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cms.DefaultCMSSignatureAlgorithmNameGenerator;
import org.bouncycastle.cms.SignerInformationVerifier;
import org.bouncycastle.operator.ContentVerifierProvider;
import org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
import org.bouncycastle.operator.DigestCalculatorProvider;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;

public class JcaSimpleSignerInfoVerifierBuilder
{
  private Helper helper = new Helper(null);
  
  public JcaSimpleSignerInfoVerifierBuilder setProvider(Provider paramProvider)
  {
    helper = new ProviderHelper(paramProvider);
    return this;
  }
  
  public JcaSimpleSignerInfoVerifierBuilder setProvider(String paramString)
  {
    helper = new NamedHelper(paramString);
    return this;
  }
  
  public SignerInformationVerifier build(X509CertificateHolder paramX509CertificateHolder)
    throws OperatorCreationException, CertificateException
  {
    return new SignerInformationVerifier(new DefaultCMSSignatureAlgorithmNameGenerator(), new DefaultSignatureAlgorithmIdentifierFinder(), helper.createContentVerifierProvider(paramX509CertificateHolder), helper.createDigestCalculatorProvider());
  }
  
  public SignerInformationVerifier build(X509Certificate paramX509Certificate)
    throws OperatorCreationException
  {
    return new SignerInformationVerifier(new DefaultCMSSignatureAlgorithmNameGenerator(), new DefaultSignatureAlgorithmIdentifierFinder(), helper.createContentVerifierProvider(paramX509Certificate), helper.createDigestCalculatorProvider());
  }
  
  public SignerInformationVerifier build(PublicKey paramPublicKey)
    throws OperatorCreationException
  {
    return new SignerInformationVerifier(new DefaultCMSSignatureAlgorithmNameGenerator(), new DefaultSignatureAlgorithmIdentifierFinder(), helper.createContentVerifierProvider(paramPublicKey), helper.createDigestCalculatorProvider());
  }
  
  private class Helper
  {
    private Helper() {}
    
    ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().build(paramPublicKey);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().build(paramX509Certificate);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
      throws OperatorCreationException, CertificateException
    {
      return new JcaContentVerifierProviderBuilder().build(paramX509CertificateHolder);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().build();
    }
  }
  
  private class NamedHelper
    extends JcaSimpleSignerInfoVerifierBuilder.Helper
  {
    private final String providerName;
    
    public NamedHelper(String paramString)
    {
      super(null);
      providerName = paramString;
    }
    
    ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramPublicKey);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509Certificate);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().setProvider(providerName).build();
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
      throws OperatorCreationException, CertificateException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(paramX509CertificateHolder);
    }
  }
  
  private class ProviderHelper
    extends JcaSimpleSignerInfoVerifierBuilder.Helper
  {
    private final Provider provider;
    
    public ProviderHelper(Provider paramProvider)
    {
      super(null);
      provider = paramProvider;
    }
    
    ContentVerifierProvider createContentVerifierProvider(PublicKey paramPublicKey)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramPublicKey);
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509Certificate paramX509Certificate)
      throws OperatorCreationException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509Certificate);
    }
    
    DigestCalculatorProvider createDigestCalculatorProvider()
      throws OperatorCreationException
    {
      return new JcaDigestCalculatorProviderBuilder().setProvider(provider).build();
    }
    
    ContentVerifierProvider createContentVerifierProvider(X509CertificateHolder paramX509CertificateHolder)
      throws OperatorCreationException, CertificateException
    {
      return new JcaContentVerifierProviderBuilder().setProvider(provider).build(paramX509CertificateHolder);
    }
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoVerifierBuilder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.security.cert.X509CertSelector;
import org.bouncycastle.cms.KeyTransRecipientId;
import org.bouncycastle.cms.SignerId;

public class JcaX509CertSelectorConverter
  extends org.bouncycastle.cert.selector.jcajce.JcaX509CertSelectorConverter
{
  public X509CertSelector getCertSelector(KeyTransRecipientId paramKeyTransRecipientId)
  {
    return doConversion(paramKeyTransRecipientId.getIssuer(), paramKeyTransRecipientId.getSerialNumber(), paramKeyTransRecipientId.getSubjectKeyIdentifier());
  }
  
  public X509CertSelector getCertSelector(SignerId paramSignerId)
  {
    return doConversion(paramSignerId.getIssuer(), paramSignerId.getSerialNumber(), paramSignerId.getSubjectKeyIdentifier());
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JcaX509CertSelectorConverter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.io.IOException;
import java.security.AlgorithmParameters;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Provider;
import java.security.SecureRandom;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.bouncycastle.cms.CMSException;

public class JceAlgorithmIdentifierConverter
{
  private EnvelopedDataHelper helper = new EnvelopedDataHelper(new DefaultJcaJceExtHelper());
  private SecureRandom random;
  
  public JceAlgorithmIdentifierConverter setProvider(Provider paramProvider)
  {
    helper = new EnvelopedDataHelper(new ProviderJcaJceExtHelper(paramProvider));
    return this;
  }
  
  public JceAlgorithmIdentifierConverter setProvider(String paramString)
  {
    helper = new EnvelopedDataHelper(new NamedJcaJceExtHelper(paramString));
    return this;
  }
  
  public AlgorithmParameters getAlgorithmParameters(AlgorithmIdentifier paramAlgorithmIdentifier)
    throws CMSException
  {
    ASN1Encodable localASN1Encodable = paramAlgorithmIdentifier.getParameters();
    if (localASN1Encodable == null) {
      return null;
    }
    try
    {
      AlgorithmParameters localAlgorithmParameters = helper.createAlgorithmParameters(paramAlgorithmIdentifier.getAlgorithm());
      localAlgorithmParameters.init(localASN1Encodable.toASN1Primitive().getEncoded(), "ASN.1");
      return localAlgorithmParameters;
    }
    catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
    {
      throw new CMSException("can't find parameters for algorithm", localNoSuchAlgorithmException);
    }
    catch (IOException localIOException)
    {
      throw new CMSException("can't parse parameters", localIOException);
    }
    catch (NoSuchProviderException localNoSuchProviderException)
    {
      throw new CMSException("can't find provider for algorithm", localNoSuchProviderException);
    }
  }
}

/* Location:
 * Qualified Name:     org.bouncycastle.cms.jcajce.JceAlgorithmIdentifierConverter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.bouncycastle.cms.jcajce;

import java.io.OutputStream;
import java.security.AlgorithmParameters;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.CipherOutputStream;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.operator.GenericKey;
import org.bouncycastle.operator.OutputEncryptor;

class JceCMSConten
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd