Completed
Push — master ( a97add...702095 )
by Aimeos
02:48
created

Ezpublish::encode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2016
6
 * @package MShop
7
 * @subpackage Common
8
 */
9
10
11
namespace Aimeos\MShop\Common\Item\Helper\Password;
12
13
14
/**
15
 * Ezpublish implementation of the password helper item
16
 *
17
 * @package MShop
18
 * @subpackage Common
19
 */
20
class Ezpublish implements \Aimeos\MShop\Common\Item\Helper\Password\Iface
21
{
22
	/**
23
	 * Returns the hashed password
24
	 *
25
	 * @param string $password Clear text password string
26
	 * @param string|null $salt Password salt
27
	 * @return string Hashed password
28
	 */
29
	public function encode( $password, $salt = null )
30
	{
31
		return md5( $salt . "\n" . $password );
32
	}
33
}
34