Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Encrypt and Decrypt with openssl

Newbie Spellweaver
Joined
Jan 26, 2017
Messages
23
Reaction score
5
hi guys,

i made Encrypt and Decrypt function as follow:
NOTE: can't post php code here, i have made it at this link:

How i can get the correct Decrypted result?

Thank you for your help :)
 
git bisect -m
Loyal Member
Joined
Sep 2, 2011
Messages
2,171
Reaction score
916
Fixed it for you.

Why you was using open SSL random bytes as initializing vector? That would not work. I removed your base64 and trim/strstr only by test. But would work with they added too.

You need understand that you need do a padding manipulation of the decrypted result because of your random initializing vector. First at all you need save in some place the output of openssl_random_bytes in order to see a specific byte combination.

More explanation here.
 
Newbie Spellweaver
Joined
Jan 26, 2017
Messages
23
Reaction score
5
thank you.

i just trying experiment. got home work from my campus
 
Back
Top