Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe SimpleCryptPassword
+ Graphe d'héritage de SimpleCryptPassword:

Fonctions membres publiques

 create ($password, $type=null)
 
 setCost ($cost)
 
 verify ($password, $hash)
 
 setDefaultType ($type)
 
 getDefaultType ()
 

Fonctions membres protégées

 getSalt ($length)
 

Attributs protégés

 $cost = 10
 
 $defaultType = '$2y$'
 

Membres hérités additionnels

- Champs de données hérités de CryptPassword
const BLOWFISH = '$2y$'
 
const JOOMLA = 'Joomla'
 
const PBKDF = '$pbkdf$'
 
const MD5 = '$1$'
 

Description détaillée

Joomla Platform Password Crypter

Depuis
3.0.1
Obsolète:
4.0 Use PHP 5.5's native password hashing API

Documentation des fonctions membres

◆ create()

create (   $password,
  $type = null 
)

Creates a password hash

Paramètres
string$passwordThe password to hash.
string$typeThe hash type.
Renvoie
mixed The hashed password or false if the password is too long.
Depuis
3.0.1
Exceptions

Implémente CryptPassword.

Références $password, $type, CryptPassword\BLOWFISH, Crypt\hasStrongPasswordSupport(), CryptPassword\JOOMLA, et CryptPassword\MD5.

◆ getDefaultType()

getDefaultType ( )

Gets the default type

Renvoie
string $type The default type
Depuis
3.1.4
Obsolète:
4.0 Use PHP 5.5's native password hashing API

Implémente CryptPassword.

◆ getSalt()

getSalt (   $length)
protected

Generates a salt of specified length. The salt consists of characters in the set [./0-9A-Za-z].

Paramètres
integer$lengthThe number of characters to return.
Renvoie
string The string of random characters.
Depuis
3.0.1
Obsolète:
4.0 Use PHP 5.5's native password hashing API

Références Crypt\genRandomBytes().

◆ setCost()

setCost (   $cost)

Sets the cost parameter for the generated hash for algorithms that use a cost factor.

Paramètres
integer$costThe new cost value.
Renvoie
void
Depuis
3.0.1
Obsolète:
4.0 Use PHP 5.5's native password hashing API

◆ setDefaultType()

setDefaultType (   $type)

Sets a default type

Paramètres
string$typeThe value to set as default.
Renvoie
void
Depuis
3.1.4
Obsolète:
4.0 Use PHP 5.5's native password hashing API

Implémente CryptPassword.

Références $type.

◆ verify()

verify (   $password,
  $hash 
)

Verifies a password hash

Paramètres
string$passwordThe password to verify.
string$hashThe password hash to check.
Renvoie
boolean True if the password is valid, false otherwise.
Depuis
3.0.1
Obsolète:
4.0 Use PHP 5.5's native password hashing API

Implémente CryptPassword.

Références $hash, $parts, $password, $type, Crypt\hasStrongPasswordSupport(), et Crypt\timingSafeCompare().

Documentation des champs

◆ $cost

$cost = 10
protected

◆ $defaultType

$defaultType = '$2y$'
protected

La documentation de cette classe a été générée à partir du fichier suivant :