Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7852177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:21:32+00:00 2026-06-02T19:21:32+00:00

makecert -r -pe -n CN=CERT_SIGN_TEST_CERT -b 01/01/2010 -e 01/01/2012 -sky exchange -ss my using

  • 0
makecert -r -pe -n "CN=CERT_SIGN_TEST_CERT" -b 01/01/2010 -e 01/01/2012 -sky exchange -ss my

using this command i generate certificate and exported .pfx file from that and this pfx file is used to encrypt the xml file

in .net using EncryptedXml , X509Certificate2, RSACryptoServiceProvider and
XmlDocument classes

i encrypt following xml

<Test><Name>Foo</Name><CardNo>123</CardNo></Test>

as follows:

<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#"><EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" /><KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#"><EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" /><KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><X509Data><X509Certificate>MIICFzCCAYCgAwIBAgIQK5IFtxwNaJhGzXuDf92TgzANBgkqhkiG9w0BAQQFADAfMR0wGwYDVQQDHhQARgBpAG4AYQBsAF8AQwBlAHIAdDAeFw0wOTEyMzExODMwMDBaFw0xMjEyMzExODMwMDBaMB8xHTAbBgNVBAMeFABGAGkAbgBhAGwAXwBDAGUAcgB0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1Wx11luboMbT1swXV/56j2RYRhR81n9hF3b6tfof1zHRorg7DIP3hvnVtqDF+WxAjn1um97DHtxWf3solthbIHC9cGtqxUhZhgdd0aVAuiKTBbTgnOWdEqTErenrHOzlZnD9iDzOm3OYVLKN+3hKJmjlhTp0sFsu4AIbXlxZVHQIDAQABo1QwUjBQBgNVHQEESTBHgBBDXPlnSZ5zUyVbxJzJO12goSEwHzEdMBsGA1UEAx4UAEYAaQBuAGEAbABfAEMAZQByAHSCECuSBbccDWiYRs17g3/dk4MwDQYJKoZIhvcNAQEEBQADgYEAiubZJZdF3Y9ItOl7LTyixcbuebs50GLFsTeMslS3usq6psXcUEFJntXJ5vXOSe/vp6E6A5AwW4MtPfnB1kzach4T4+WlWeaDHoyj6y5j+n7P6B/X6ZhkQ8MCiGhZ/fTOt7CDisnFVG9gvoH2LUEs1QkiByDq6jii3TUAMN9YQdA=</X509Certificate></X509Data></KeyInfo><CipherData><CipherValue>Vyml+mtbeL5bE6EWKNqHfnE1xEkbJglcxbjH3Y7pj9BtXVImAI/SbBdLHatyjIAei7qUfhcn+qYC7WAh48XR78BgqCdJX7O5lfZjVSVeVaQUwl1Bdirdz7RYuveIjDtEIM80W4tB6rq2nOgYNkisxhhwIl7EiCQtT42bSGCKFic=</CipherValue></CipherData></EncryptedKey></KeyInfo><CipherData><CipherValue>ezVeQlBGZRbHqitB2mmHuMvifGB9IhG1g0CWmL8iz37JIIw7x5cGbb5Ap8iy24ACu8TJpwgAGIUWnUTDSZ//kWLzCa3G5HL+jT/RHn+zypk=</CipherValue></CipherData></EncryptedData>

as far as encryption is done using w3c standard. How can i decrypt this xml file on java. I have used .pfx file to encrypt the file. In .net i can decrypt file using following:

 EncryptedXml encXml = new EncryptedXml(xmlEncDoc);  
encXml.DecryptDocument();

How can i decrypt in java, should i pass pfx file to java end? as there is tag in encrypted xml file.

your suggestion is appriciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:21:33+00:00Added an answer on June 2, 2026 at 7:21 pm

    Do you have control over the sender and recipient of the XML message? It would be best to follow the W3 standard for XML Signatures. Java 6 includes full support for digital signatures and there is a good tutorial available which explains how to do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a certificate using the following SSL command: makecert -r -pe -n
This code will add a x509 cer cert file into the certificate store (using
When I generate a certificate using MakeCert.exe, I want to change the key size
i am using a certificate generated by makecert which has both private and public
I'm creating a x509 certificate using makecert with the following parameters: makecert -r -pe
Did I missed anything during this? I am running a this command from command
Using the -ss option of Microsoft tool MakeCert.exe (-ss specifies the subject's certificate store
I'm trying to make a certificate for testing and I am using this site
I have a certificate generated via MakeCert. I want to use this certificate for
I am using makecert to create certificate i need to do it though c#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.