Completed
Push — master ( 84efce...33db28 )
by Michael
08:03
created

AesExp   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 13
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A invalidChecksum() 0 5 1
1
<?php
2
3
/**
4
 * AesExp.php
5
 * 
6
 * PHP version 5
7
 * 
8
 * @category Dcrypt
9
 * @package  Dcrypt
10
 * @author   Michael Meyer (mmeyer2k) <[email protected]>
11
 * @license  http://opensource.org/licenses/MIT The MIT License (MIT)
12
 * @link     https://github.com/mmeyer2k/dcrypt
13
 */
14
15
namespace Dcrypt;
16
17
/**
18
 * Symmetric AES-256-CBC encryption functions powered by OpenSSL. This class 
19
 * will throw an exception on checksum inequality.
20
 * 
21
 * @category Dcrypt
22
 * @package  Dcrypt
23
 * @author   Michael Meyer (mmeyer2k) <[email protected]>
24
 * @license  http://opensource.org/licenses/MIT The MIT License (MIT)
25
 * @link     https://github.com/mmeyer2k/dcrypt
26
 * @link     https://apigen.ci/github/mmeyer2k/dcrypt/namespace-Dcrypt.html
27
 */
28
class AesExp extends Aes
29
{
30
31
    /**
32
     * Throw an invalid checksum exception.
33
     */
34 1
    protected static function invalidChecksum()
35
    {
36 1
        $e = 'Decryption can not proceed due to invalid cyphertext checksum.';
37 1
        throw new \Exception($e);
38
    }
39
40
}
41