Link to home
Create AccountLog in
Avatar of tonelm54
tonelm54

asked on

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 :-)
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

libsodium has both Visual Studio and php libraries.

HTH,
Dan
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account