Class JCryptPasswordSimple

Description

Implements interfaces:

Joomla Platform Password Crypter

  • since: 12.2

Located in /libraries/joomla/crypt/password/simple.php (line 19)


	
			
Variable Summary
 integer $cost
 string $defaultType
Method Summary
 mixed create (string $password, [string $type = null])
 string getDefaultType ()
 string getSalt (integer $length)
 void setCost (integer $cost)
 void setDefaultType (string $type)
 boolean verify (string $password, string $hash)
Variables
integer $cost = 10 (line 25)
  • var: The cost parameter for hashing algorithms.
  • since: 12.2
  • access: protected
string $defaultType = '$2y$' (line 31)
  • var: The default hash type
  • since: 12.3
  • access: protected
Methods
create (line 44)

Creates a password hash

  • return: The hashed password or false if the password is too long.
  • since: 12.2
  • throws: InvalidArgumentException
  • access: public
mixed create (string $password, [string $type = null])
  • string $password: The password to hash.
  • string $type: The hash type.

Implementation of:
JCryptPassword::create()
Creates a password hash
getDefaultType (line 195)

Gets the default type

  • return: The default type
  • since: 12.3
  • access: public
string getDefaultType ()

Implementation of:
JCryptPassword::getDefaultType()
Gets the default type
getSalt (line 118)

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

  • return: The string of random characters.
  • since: 12.2
  • access: protected
string getSalt (integer $length)
  • integer $length: The number of characters to return.
setCost (line 104)

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

  • since: 12.2
  • access: public
void setCost (integer $cost)
  • integer $cost: The new cost value.
setDefaultType (line 180)

Sets a default type

  • since: 12.3
  • access: public
void setDefaultType (string $type)
  • string $type: The value to set as default.

Implementation of:
JCryptPassword::setDefaultType()
Sets a default prefix
verify (line 137)

Verifies a password hash

  • return: True if the password is valid, false otherwise.
  • since: 12.2
  • access: public
boolean verify (string $password, string $hash)
  • string $password: The password to verify.
  • string $hash: The password hash to check.

Implementation of:
JCryptPassword::verify()
Verifies a password hash

Documentation generated on Tue, 19 Nov 2013 15:12:59 +0100 by phpDocumentor 1.4.3