Class JCrypt

Description

JCrypt is a Joomla Platform class for handling basic encryption/decryption of data.

  • since: 12.1

Located in /libraries/joomla/crypt/crypt.php (line 19)


	
			
Variable Summary
Method Summary
static string genRandomBytes ([integer $length = 16])
JCrypt __construct ([JCryptCipher $cipher = null], [JCryptKey $key = null])
string decrypt (string $data)
string encrypt (string $data)
JCryptKey generateKey ([array $options = array()])
Variables
JCryptCipher $_cipher (line 25)
  • var: The encryption cipher object.
  • since: 12.1
  • access: private
JCryptKey $_key (line 31)
  • var: The encryption key[/pair)].
  • since: 12.1
  • access: private
Methods
static method genRandomBytes (line 118)

Generate random bytes.

  • return: Random binary data
  • since: 12.1
  • access: public
static string genRandomBytes ([integer $length = 16])
  • integer $length: Length of the random data to generate
Constructor __construct (line 42)

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.

  • since: 12.1
  • access: public
JCrypt __construct ([JCryptCipher $cipher = null], [JCryptKey $key = null])
decrypt (line 60)

Method to decrypt a data string.

  • return: The decrypted data string.
  • since: 12.1
  • access: public
string decrypt (string $data)
  • string $data: The encrypted string to decrypt.
encrypt (line 74)

Method to encrypt a data string.

  • return: The encrypted data string.
  • since: 12.1
  • access: public
string encrypt (string $data)
  • string $data: The data string to encrypt.
generateKey (line 88)

Method to generate a new encryption key[/pair] object.

  • since: 12.1
  • access: public
JCryptKey generateKey ([array $options = array()])
  • array $options: Key generation options.
setKey (line 102)

Method to set the encryption key[/pair] object.

  • since: 12.1
  • access: public
JCrypt setKey (JCryptKey $key)

Documentation generated on Mon, 25 Jun 2012 13:53:55 -0500 by phpDocumentor 1.4.4