[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Crypt/ -> Crypt.php (summary)

Joomla! Content Management System

Copyright: (C) 2012 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 150 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Crypt:: (3 methods):
  timingSafeCompare()
  safeStrlen()
  safeSubstr()


Class: Crypt  - X-Ref

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

timingSafeCompare($known, $unknown)   X-Ref
A timing safe comparison method.

This defeats hacking attempts that use timing based attack vectors.

NOTE: Length will leak.

param: string  $known    A known string to check against.
param: string  $unknown  An unknown string to check.
return: boolean  True if the two strings are exactly the same.

safeStrlen($str)   X-Ref
Safely detect a string's length

This method is derived from \ParagonIE\Halite\Util::safeStrlen()

param: string  $str  String to check the length of
return: integer

safeSubstr($str, $start, $length = null)   X-Ref
Safely extract a substring

This method is derived from \ParagonIE\Halite\Util::safeSubstr()

param: string   $str     The string to extract the substring from
param: integer  $start   The starting position to extract from
param: integer  $length  The length of the string to return
return: string



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