NYCPHP Meetup

NYPHP.org

[nycphp-talk] Quick question about mcrypt return values

Chris Snyder chsnyder at gmail.com
Fri Sep 23 11:47:58 EDT 2011


On Fri, Sep 23, 2011 at 11:38 AM, Anthony Papillion <papillion at gmail.com> wrote:
> Hey Everyone,
>
> So I've never used MCRYPT before today and I've got a question. How
> can I tell if it's worked or failed? The doc says MCRYPT_DECRYPT() and
> MCRYPT_ENCRYPT() will return decrypted or encrypted data respectively
> but how do I know if it's completely failed?
>
> Thanks!
> Anthony
>

If it failed you get binary gibberish, or nothing, and you get to
troubleshoot till you figure out the problem.

It's not very dev friendly, but it works.



More information about the talk mailing list