Decrypt the file

Dear Experts

I have one encrypted file. i need decrypt the file line by line using visual basic program.


open filename for input as #1,
do while not eof(1)
   line input #1,TextLine ( = decrypt line)
close #1

but original file no need to decrypt. i need open encrypted file and decrypt line by line

pls. pls. pls. help be

Best Regards,

M. Mohamed Rafeek
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What algorithm was used to encrypt the data?
Private Declare Function EncryptFile Lib "ADVAPI32" Alias "EncryptFileA" (ByVal lpFileName As String) As Boolean
Private Declare Function DecryptFile Lib "ADVAPI32" Alias "DecryptFileA" (ByVal lpFileName As String, ByVal dwReserved As Long) As Boolean
Const mFile = "c:\test.txt"
Private Sub Form_Load()
    'KPD-Team 2000
    Encrypt mFile
End Sub
Sub Encrypt(sFile As String)
    If EncryptFile(mFile) Then
        MsgBox "The file's succesfully encrypted. Log in as another user and try to access this file."
    End If
End Sub
Sub Decrypt(sFile As String)
    If DecryptFile(mFile, 0) = True Then
        MsgBox "The file's succesfully decrypted."
    End If
End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.