Back to Joomla project (class list)

Class SodiumCipher - list of methods

JCrypt cipher for sodium algorithm encryption, decryption and key generation.
Package: Joomla\CMS\Crypt\Cipher
Copyright: (C) 2017 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Crypt/Cipher/SodiumCipher.php
Project: Joomla

Method Summary

public string
(mixed $data, \Joomla\Crypt\Key $key)

Method to decrypt a data string.
Parameters
  • string $data The encrypted string to decrypt.
  • \Joomla\Crypt\Key $key The key object to use for decryption.
Returns
  • string The decrypted data string.
Since
  • 3.8.0
-
  • \RuntimeException
Show source code of this method: decrypt Source Code

public string
(mixed $data, \Joomla\Crypt\Key $key)

Method to encrypt a data string.
Parameters
  • string $data The data string to encrypt.
  • \Joomla\Crypt\Key $key The key object to use for encryption.
Returns
  • string The encrypted data string.
Since
  • 3.8.0
-
  • \RuntimeException
Show source code of this method: encrypt Source Code

public \Joomla\Crypt\Key
(array $options = array())

Method to generate a new encryption key object.
Parameters
  • array $options Key generation options.
Returns
  • \Joomla\Crypt\Key
Since
  • 3.8.0
-
  • \RuntimeException
Show source code of this method: generateKey Source Code

public static bool
()

Check if the cipher is supported in this environment.
Returns
  • bool
Since
  • 4.0.0
Show source code of this method: isSupported Source Code

public void
(mixed $nonce)

Set the nonce to use for encrypting/decrypting messages
Parameters
  • string $nonce The message nonce
Returns
  • void
Since
  • 3.8.0
Show source code of this method: setNonce Source Code

Properties Summary

private string
$nonce
The message nonce to be used with encryption/decryption
Since
  • 3.8.0

Tags Summary

Since
3.8.0