core/model/modx/hashing/modmd5.class.php
This file contains an MD5 modHash implementation.
- Package
- modx
- Subpackage
- hashing
\modMD5
Package: modx\hashing
Parameters
Returns
An MD5 implementation of modHash.
- Parent(s)
- \modHash
Properties


\modHashing
$host= 'null'
inherited
A reference to the modHashing service hosting this modHash instance.
Inherited from: \modHash::$$host
Default value
null
Details- Type
- \modHashing
- Inherited_from
- \modHash::$$host
Methods


__construct(
\modHashing $host, array | null $options
=
array()
)
:
\modHash
Parameters
Returns
Name | Type | Description |
---|---|---|
$host | \modHashing | A reference to the modHashing instance |
$options | array | null | An optional array of configuration options |
Type | Description |
---|---|
\modHash | A new derivative instance of the modHash class |


getOption(
string $key, array | null $options
=
null, mixed $default
=
null
)
:
mixed
Searches for local options and then prefixes keys with hashing_ to look for MODX System Settings.
Name | Type | Description |
---|---|---|
$key | string | The option key to get a value for. |
$options | array | null | An optional array of options to look in first. |
$default | mixed | An optional default value to return if no value is set. |
Type | Description |
---|---|
mixed | The option value or the specified default if not found. |


hash(
string $string, array $options
=
array()
)
:
mixed
Generate a md5 hash of the given string using the provided options.
Parameters
Returns
Name | Type | Description |
---|---|---|
$string | string | A string to generate a secure hash from. |
$options | array | Ignored. An array of options to be passed to the hash implementation. |
Type | Description |
---|---|
mixed | The hash result or false on failure. |