Documentation

Core_Hash
in package

Hash algorithm

Tags
subpackage

Core\Hash

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

$_instance  : mixed
The singleton instance.
$_salt  : mixed
Hash salt
factory()  : object
Create and return a Hash object for type $type
hash()  : string
Calculate hash
instance()  : object
Register an existing instance as a singleton.
salt()  : Core_Hash
Set salt

Properties

$_instance

The singleton instance.

protected static mixed $_instance = \NULL

$_salt

Hash salt

protected mixed $_salt = \NULL

Methods

factory()

Create and return a Hash object for type $type

public static factory(string $type) : object
Parameters
$type : string

hash function name $oCore_Hash_Sha1 = Core_Hash::factory('sha1');

Return values
object

hash()

Calculate hash

public abstract hash(string $value) : string
Parameters
$value : string
Return values
string

instance()

Register an existing instance as a singleton.

public static instance() : object
Return values
object

salt()

Set salt

public salt(string $salt) : Core_Hash
Parameters
$salt : string

hash salt

Return values
Core_Hash

Search results