Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe KeyProtectedByPassword

Fonctions membres publiques

 saveToAsciiSafeString ()
 
 unlockKey ($password)
 
 changePassword ($current_password, $new_password)
 

Fonctions membres publiques statiques

static createRandomPasswordProtectedKey ($password)
 
static loadFromAsciiSafeString ($saved_key_string)
 

Champs de données

const PASSWORD_KEY_CURRENT_VERSION = "\xDE\xF1\x00\x00"
 

Fonctions membres privées

 __construct ($encrypted_key)
 

Attributs privés

 $encrypted_key = ''
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $encrypted_key)
private

Constructor for KeyProtectedByPassword.

Paramètres
string$encrypted_key

Références KeyProtectedByPassword\$encrypted_key.

Documentation des fonctions membres

◆ changePassword()

changePassword (   $current_password,
  $new_password 
)

Changes the password.

Paramètres
string$current_password
string$new_password
Exceptions
Ex

Références KeyProtectedByPassword\$encrypted_key, $this, Crypto\encryptWithPassword(), Core\HASH_FUNCTION_NAME, true, et KeyProtectedByPassword\unlockKey().

◆ createRandomPasswordProtectedKey()

static createRandomPasswordProtectedKey (   $password)
static

Creates a random key protected by the provided password.

Paramètres
string$password
Exceptions
Ex

Références KeyProtectedByPassword\$encrypted_key, $password, Key\createNewRandomKey(), Crypto\encryptWithPassword(), Core\HASH_FUNCTION_NAME, et true.

◆ loadFromAsciiSafeString()

static loadFromAsciiSafeString (   $saved_key_string)
static

Loads a KeyProtectedByPassword from its encoded form.

Paramètres
string$saved_key_string
Exceptions
Ex

Références KeyProtectedByPassword\$encrypted_key, et Encoding\loadBytesFromChecksummedAsciiSafeString().

◆ saveToAsciiSafeString()

saveToAsciiSafeString ( )

Encodes the KeyProtectedByPassword into a string of printable ASCII characters.

Exceptions
Ex

Références Encoding\saveBytesToChecksummedAsciiSafeString().

◆ unlockKey()

unlockKey (   $password)

Decrypts the protected key, returning an unprotected Key object that can be used for encryption and decryption.

Exceptions
Ex

Références $password, Crypto\decryptWithPassword(), Core\HASH_FUNCTION_NAME, et Key\loadFromAsciiSafeString().

Référencé par KeyProtectedByPassword\changePassword().

Documentation des champs

◆ $encrypted_key

◆ PASSWORD_KEY_CURRENT_VERSION

const PASSWORD_KEY_CURRENT_VERSION = "\xDE\xF1\x00\x00"

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