Back to Joomla project (class list)

Class OpenSSL - list of methods

OpenSSL encryption class

Extends

Extends

Package: Joomla\CMS\Encrypt\AES
Copyright: (C) 2016 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Encrypt/AES/OpenSSL.php
Project: Joomla

Method Summary

public
()

Constructor for this class
Show source code of this method: __construct Source Code

public mixed
(mixed $mode = 'cbc', mixed $strength = 128)

Sets the AES encryption mode.
Parameters
  • string $mode Choose between CBC (recommended) or ECB
  • int $strength Bit strength of the key (128, 192 or 256 bits). DEPRECATED. READ NOTES ABOVE.
Returns
  • mixed
Show source code of this method: setEncryptionMode Source Code

public string
(mixed $plainText, mixed $key, mixed $iv = null)

Encrypts a string. Returns the raw binary ciphertext.
Parameters
  • string $plainText The plaintext to encrypt
  • string $key The raw binary key (will be zero-padded or chopped if its size is different than the block size)
  • null|string $iv The initialization vector (for CBC mode algorithms)
Returns
  • string The raw encrypted binary string.
Show source code of this method: encrypt Source Code

public string
(mixed $cipherText, mixed $key)

Decrypts a string. Returns the raw binary plaintext.
Parameters
  • string $cipherText The ciphertext to encrypt
  • string $key The raw binary key (will be zero-padded or chopped if its size is different than the block size)
Returns
  • string The raw unencrypted binary string.
Show source code of this method: decrypt Source Code

public bool
()

Is this adapter supported?
Returns
  • bool
Show source code of this method: isSupported Source Code

public int
()

Returns the encryption block size in bytes
Returns
  • int
Show source code of this method: getBlockSize Source Code

Properties Summary

protected int
$openSSLOptions
The OpenSSL options for encryption / decryption
protected string
$method
The encryption method to use

Tags Summary

Since
4.0.0