Skip to content

icms_core_Password

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_core_Password

Class to encrypt User Passwords.

  • Class name: icms_core_Password
  • Namespace:

Properties

$pass

private mixed $pass
  • Visibility: private

$salt

private mixed $salt
  • Visibility: private

$mainSalt

private mixed $mainSalt
  • Visibility: private

$uname

private mixed $uname
  • Visibility: private

Methods

__construct

mixed icms_core_Password::__construct()

Constructor for the Password class

  • Visibility: public

getInstance

object icms_core_Password::getInstance()

Access the only instance of this class

  • Visibility: public
  • This method is static.

createCryptoKey

string icms_core_Password::createCryptoKey(string slength)

This Function creates a unique Crypto Generated Key for use with password encryptions This functions falls back to standard function createSalt() if PHP < 5.3

  • Visibility: public

Arguments

  • slength string - <p>The length of the key to produce</p>

createSalt

string icms_core_Password::createSalt(string slength)

This Function creates a unique random Salt Key for use with password encryptions It can also be used to generate a random AlphaNumeric key sequence of any given length.

  • Visibility: public
  • This method is static.

Arguments

  • slength string - <p>The length of the key to produce</p>

passExpired

bool icms_core_Password::passExpired(string uname)

This Public Function checks whether a users password has been expired

  • Visibility: public

Arguments

  • uname string - <p>The username of the account to be checked</p>

_passExpired

bool icms_core_Password::_passExpired(string uname)

This Private Function checks whether a users password has been expired

  • Visibility: private

Arguments

  • uname string - <p>The username of the account to be checked</p>

getUserSalt

string icms_core_Password::getUserSalt(string uname)

This Public Function returns the User Salt key belonging to username.

  • Visibility: public

Arguments

  • uname string - <p>Username to find User Salt key for.</p>

_getUserSalt

string icms_core_Password::_getUserSalt(string uname)

This Private Function returns the User Salt key belonging to username.

  • Visibility: private

Arguments

  • uname string - <p>Username to find User Salt key for.</p>

getUserEncType

string icms_core_Password::getUserEncType(string uname)

This Public Function returns the User Encryption Type belonging to username.

  • Visibility: public

Arguments

  • uname string - <p>Username to find Encryption Type for.</p>

_getUserEncType

string icms_core_Password::_getUserEncType(string uname)

This Private Function returns the User Encryption Type belonging to username.

  • Visibility: private

Arguments

  • uname string - <p>Username to find Enc_type for.</p>

encryptPass

\Hash icms_core_Password::encryptPass(string pass)

This Public Function is used to Encrypt User Passwords

  • Visibility: public

Arguments

  • pass string - <p>plaintext password to be encrypted</p>

_encryptPassword

\Hash icms_core_Password::_encryptPassword(string pass, string salt, int enc_type, int iterations)

This Private Function is used to Encrypt User Passwords

  • Visibility: private

Arguments

  • pass string - <p>plaintext password to be encrypted</p>
  • salt string - <p>unique user salt key used in encryption process</p>
  • enc_type int - <p>encryption type to use.</p>
  • iterations int - <p>Number of times to rehash(stretch).</p>

_rehash

\Hash icms_core_Password::_rehash(string hash, int iterations, int enc_type)

This Private Function rehashes (stretches) the Password Hash

  • Visibility: private

Arguments

  • hash string - <p>hash to be re-hashed (stretched)</p>
  • iterations int - <p>Number of times to re-hash</p>
  • enc_type int - <p>encryption type to use</p>

verifyPass

mixed icms_core_Password::verifyPass(string pass, string uname)

This Public Function verifies if the users password is correct.

  • Visibility: public

Arguments

  • pass string - <p>Password to verify.</p>
  • uname string - <p>Username to verify.</p>

_verifyPassword

mixed icms_core_Password::_verifyPassword(string pass, string uname)

This Private Function verifies if the password is correct

  • Visibility: private

Arguments

  • pass string - <p>Password to be verified</p>
  • uname string - <p>Username of password to be verified</p>

_getUserHash

string icms_core_Password::_getUserHash(string uname)

This Private Function returns the User Password Hash belonging to username.

  • Visibility: private

Arguments

  • uname string - <p>Username to find hash for.</p>

_encryptPass

\Hash icms_core_Password::_encryptPass(string pass, string salt, int enc_type)

This Private Function is used to Encrypt User Passwords

  • Visibility: private

Arguments

  • pass string - <p>plaintext password to be encrypted</p>
  • salt string - <p>unique user salt key used in encryption process</p>
  • enc_type int - <p>encryption type to use (this is required & only used when passwords are expired)</p>
Clone this wiki locally