Encryption for the masses

By Eric Jones

In my last post I talked about using the cfusion_encrypt() and cfusion_decrypt() functions for creating URL & DB safe encrypted strings.

As I mentioned before this isn’t for everyone because the functions are undocumented and not available to all users, ie those of you on shared hosting plans.

Well I was browsing the web and came across this thread on the House of Fusion mailing list which offers an alternative way to encrypt/decrypt strings for DB insertion

The code look like so:

This produces a db safe string

This decrypts the string

Pretty straight forward and this should work on your shared hosting environment too! Just be sure to check with your IHP to ensure you have access to these functions.

No Reader comments



Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in Front-end, once a week, for free.