\JCrypt
JCrypt is a Joomla Platform class for handling basic encryption/decryption of data.
Synopsis
class JCrypt
{
- // methods
- public void __construct()
- public string decrypt()
- public string encrypt()
- public JCryptKey generateKey()
- public JCrypt setKey()
- public static string genRandomBytes()
- public static boolean timingSafeCompare()
- public static boolean hasStrongPasswordSupport()
Members
private
- $_cipher — JCryptCipher
- $_key — JCryptKey
Methods
public
- __construct() — Object Constructor takes an optional key to be used for encryption/decryption. If no key is given then the secret word from the configuration object is used.
- decrypt() — Method to decrypt a data string.
- encrypt() — Method to encrypt a data string.
- genRandomBytes() — Generate random bytes.
- generateKey() — Method to generate a new encryption key[/pair] object.
- hasStrongPasswordSupport() — Tests for the availability of updated crypt().
- setKey() — Method to set the encryption key[/pair] object.
- timingSafeCompare() — A timing safe comparison method. This defeats hacking attempts that use timing based attack vectors.