Encrpyt / Decrypt in PHP and VB.net

Ive been trying to find a function which can encrypt data from VB.net and then decrypt to PHP, and also encrypt in PHP and decrypt in VB.net.

What I have is several files I want to upload in VB.net encrypted and then for PHP to simply store them in the encrypted form, and when needed, php sends the encrypted files back to VB.net which decrypts it and then stores on the local PC decrypted. This works great, but now I want to write a web front end so need to decrypt the files which are stored on the server to allow them to be viewable by the web application.

Ive found solutions in both PHP and VB.net but when it comes to writing a function for the other language and then testing the tests fail. I dont want to use my current encrpyting function (mainly cause I wrote it many years ago and it sucks in terms of security).

Does anyone have any examples to encrypt and decrypt which will return the same results no matter if its encrypted or decrypted in VB.net or PHP?

Thank you in advance :-)
tonelm54Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Dan CraciunIT ConsultantCommented:
libsodium has both Visual Studio and php libraries.

HTH,
Dan

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
Visual Basic.NET

From novice to tech pro — start learning today.