[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/crypt/src/ -> Crypt.php (summary)

Part of the Joomla Framework Crypt Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 138 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Crypt:: (6 methods):
  __construct()
  decrypt()
  encrypt()
  generateKey()
  setKey()
  genRandomBytes()


Class: Crypt  - X-Ref

Crypt is a Joomla Framework class for handling basic encryption/decryption of data.

__construct(?CipherInterface $cipher = null, ?Key $key = null)   X-Ref
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.

param: CipherInterface  $cipher  The encryption cipher object.
param: Key              $key     The encryption key[/pair)].

decrypt($data)   X-Ref
Method to decrypt a data string.

param: string  $data  The encrypted string to decrypt.
return: string  The decrypted data string.

encrypt($data)   X-Ref
Method to encrypt a data string.

param: string  $data  The data string to encrypt.
return: string  The encrypted data string.

generateKey(array $options = [])   X-Ref
Method to generate a new encryption key[/pair] object.

param: array  $options  Key generation options.
return: Key

setKey(Key $key)   X-Ref
Method to set the encryption key[/pair] object.

param: Key  $key  The key object to set.
return: Crypt  Instance of $this to allow chaining.

genRandomBytes($length = 16)   X-Ref
Generate random bytes.

param: integer  $length  Length of the random data to generate
return: string  Random binary data



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer