File decryption

One of the third party external system is providing us the password protected Zip file (txt file or XML file). I tried to unzip the file using powershell command means I wrote the powershell command and called it through Dynamics AX and it is working fine. But the file is still password protected. I am not sure how to read the password protected file in Dynamics AX (I know the password of the file).

Is there any API or code in Dynamics AX which I can use directly to read the password protected file ? or is there any Powershell command for that ?

Hi Mukti, I moved from your question from the thread about PGP, because you confirmed that you’re not talking about PGP.

Please add a tag with your version of AX, because it might be important.

Can you please explain what you mean by saying that you can unzip the file but it’s still password-protected? It sounds like that the ZIP file itself isn’t encrypted, but the file inside is (in some way that you haven’t explained yet).

Yes martin, You are right. I am in Dynamics AX 2012 R3-CU10.

The Zip file is not encrypted but the file inside the folder is password protected. Ok, So once I unzip the folder it creates a new folder with same name at put the file it it. but as soon as I double click on this file, it asks for the password means the file is password protected.

Is there any way I can read the file or should i ask the external system to encrypt the the zip file.

Can you explain that? How can a text or XML file ask for password? Or does it mean that you have another ZIP archive inside and we’re back where we started?

I am sorry, We can only do the password protected using some software like winZip or Pdf.

But the question is -
Is there any API or class in AX which can be used to unzip and read the password protected file ? or should we use poweshell command ? If poweshell command than do you have any code ?

Could you please explicitly tell us what kind of file (“the file inside the folder” ) you’re talking about? We can’t discuss how to decrypt some unknown format.

Note any data can be encrypted, not just ZIP pr PDF files.

The file inside the folder is a XML file.

Fine, so now tell us how it’s encrypted. You said it asked for password, but a text file (such as XML) can’t just ask for password.