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

Ezpublish   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A encode() 0 4 1
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