Md5::unHash()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace FMUP\Crypt\Driver;
3
4
use FMUP\Crypt\CryptInterface;
5
use FMUP\Crypt\Exception;
6
7
class Md5 implements CryptInterface
8
{
9
10
    /**
11
     * Hash the given password
12
     * @param string $password
13
     * @return string
14
     */
15 3
    public function hash($password)
16
    {
17 3
        return md5($password);
18
    }
19
20
    /**
21
     *
22
     * @param string $password
23
     * @throws Exception
24
     * @return string
25
     */
26 1
    public function unHash($password)
27
    {
28 1
        throw new Exception('Invalid method for this driver');
29
    }
30
}
31