![]() |
![]() |
![]() |
PHP and C++ encryption/bigint libraries My boss just gave me an assignment today, due tomorrow, to take information that is inputted in a PHP script and encrypt it, then decrypt it in c++... it needs to be encrypted because en route it's getting stored in a database and passed through unencrypted email.
Richard Boehme
Look into the mcrypt library in PHP, provided you implement it with an algorithm for which there is a commonly available C++ library, like blowfish, and pass the initialisation vector along with the data, and obviously your C++ code will know the key, it shouldn't be too hard...
Andrew Cherry
Don't go implementing algorthms or even using them directly through a library. Use standard, complete protocols/formats, if you're communicating with the the C++ code via http, use SSL, if you're sending email have a look at S/MIME. In case you don't really know what kind of channels and systems your encrypted information will pass en route, encrypt the file with an external call to something like pgp or gnu-pg and hand around the encrypted file. No chance of creating anything with even halfassed security until tommorrow from scratch, even if you really really know what you're doing.
a2800276
|