Completed
Push — master ( ca77ed...3bcd04 )
by Michael
03:25
created

AesCtrExp::invalidChecksum()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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 AesCtrExp extends AesCtr
29
{
30
31
    /**
32
     * Throw an invalid checksum exception.
33
     */
34
    protected static function invalidChecksum()
35
    {
36
        $e = 'Decryption can not proceed due to invalid cyphertext checksum.';
37
        throw new \InvalidArgumentException($e);
38
    }
39
40
}
41