Link to home
Create AccountLog in
Avatar of tonelm54

asked on

Encrpyt / Decrypt in PHP and

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

What I have is several files I want to upload in encrypted and then for PHP to simply store them in the encrypted form, and when needed, php sends the encrypted files back to 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 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 or PHP?

Thank you in advance :-)
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

libsodium has both Visual Studio and php libraries.

Avatar of Mlanda T
Mlanda T
Flag of South Africa image

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