Detect base64 encoding in PHP?

Posted by Ian Silber on Stack Overflow See other posts from Stack Overflow or by Ian Silber
Published on 2010-03-31T20:45:45Z Indexed on 2010/03/31 20:53 UTC
Read the original article Hit count: 466

Filed under:
|
|

Is there some way to detect if a string has been base64_encoded() in PHP?

We're converting some storage from plain text to base64 and part of it lives in a cookie that needs to be updated. I'd like to reset their cookie if the text has not yet been encoded, otherwise leave it alone.

© Stack Overflow or respective owner

Related posts about php

Related posts about base64