The Encryption helper wraps common PHP libraries in a way that makes it easy to encrypt data for more secure storage.

Requires the PHP mcrypt extension. If this extension is unavailable, encrypt and decrypt will simply pass text back!

Loading the Helper

$eh = Loader::helper(‘encryption’);

Methods

$encryptedText = $eh->encrypt($text)

Takes $text and encrypts it.

$text = $eh->decrypt($encryptedText)

Takes $encryptedText and decrypts it.

$eh->isAvailable()

Returns true if encryption is available, otherwise false.

Recent Discussions on this Topic

Date localization guidelines for multilanguage sites

Hi all, I am working with Concrete5 5.4.2.2 and I would like to understand what are the guidelines to correctly write code for multilingual sites. I am interested in understanding what approach to use to have dates in english and in italian, like these:…