Examples of JceKeyTransEnvelopedRecipient


Examples of org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient

                    RecipientId rid = ri.getRID();
                    if (rid.match(materialCert) && !foundRecipient)
                    {
                        foundRecipient = true;
                        PrivateKey privateKey = (PrivateKey) material.getPrivateKey();
                        envelopedData = ri.getContent(new JceKeyTransEnvelopedRecipient(privateKey).setProvider("BC"));
                        break;
                    }
                    j++;
                    if ((verbose || LOG.isDebugEnabled()) && certificate != null)
                    {
View Full Code Here

Examples of org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient

   * @param certificateKeyProvider
   * @return
   * @throws CMSException
   */
  public static byte[] getContent(RecipientInformation recipientInfo, PrivateKey certificateKey, String certificateKeyProvider) throws CMSException {
     Recipient jceKeyTransRecipient = new JceKeyTransEnvelopedRecipient(certificateKey).setProvider(certificateKeyProvider);
    return recipientInfo.getContent(jceKeyTransRecipient);
  }
View Full Code Here

Examples of org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient

      throw new MessageDecodingException(e);
    }
  }

  private JceKeyTransEnvelopedRecipient getKeyTransRecipient() {
    return new JceKeyTransEnvelopedRecipient(priKey) {
      public RecipientOperator getRecipientOperator(
          AlgorithmIdentifier keyEncryptionAlgorithm,
          final AlgorithmIdentifier contentEncryptionAlgorithm,
          byte[] encryptedContentEncryptionKey) throws CMSException {
        if ("1.3.14.3.2.7".equals(contentEncryptionAlgorithm
View Full Code Here

Examples of org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient

   * @param certificateKeyProvider
   * @return
   * @throws CMSException
   */
  public static byte[] getContent(RecipientInformation recipientInfo, PrivateKey certificateKey, String certificateKeyProvider) throws CMSException {
     Recipient jceKeyTransRecipient = new JceKeyTransEnvelopedRecipient(certificateKey).setProvider(certificateKeyProvider);
    return recipientInfo.getContent(jceKeyTransRecipient);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.