3DES Encryption and Decryption in ASP.NET

Install reg.bat

Download the following file

DLL_install.zip

Right click reg.bat and click “Edit”

According to your download file path amend it

Right click reg.bat and click “Run as administrator”




ASP.NET

Add reference

Encrypt PDF

EncryptFile(PDF_File_Path,3DES_Export_Path,Key1,Key2)
Key1=”Kf////hIIxizelpLYlpB8g==”
Key2=”bP////gs1nLNEMFLTIxP3g==”


    AVT_Cipher.Cipher c = new AVT_Cipher.Cipher();

    c.EncryptFile("PDF_File_Path",
                  "3DES_Export_Path",
                  "Kf////hIIxizelpLYlpB8g==",
                  "bP////gs1nLNEMFLTIxP3g==")

Decrypt PDF

DecryptFile(3DES_File_Path,PDF_Export_Path,Key1,Key2)
Key1=”Kf////hIIxizelpLYlpB8g==”
Key2=”bP////gs1nLNEMFLTIxP3g==”


    AVT_Cipher.Cipher c = new AVT_Cipher.Cipher();

    c.DecryptFile("3DES_File_Path",
                  "PDF_Export_Path",
                  "Kf////hIIxizelpLYlpB8g==",
                  "bP////gs1nLNEMFLTIxP3g==")