Completed
Push — master ( 750179...0c950e )
by Michael
01:29
created

AesCbc::encrypt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * AesCbc.php
5
 *
6
 * PHP version 7
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.
19
 *
20
 * @category Dcrypt
21
 * @package  Dcrypt
22
 * @author   Michael Meyer (mmeyer2k) <[email protected]>
23
 * @license  http://opensource.org/licenses/MIT The MIT License (MIT)
24
 * @link     https://github.com/mmeyer2k/dcrypt
25
 * @link     https://apigen.ci/github/mmeyer2k/dcrypt/namespace-Dcrypt.html
26
 */
27
class AesCbc extends OpensslBridge
28
{
29
    /**
30
     * AES-256 cipher identifier that will be passed to openssl
31
     *
32
     * @var string
33
     */
34
    const CIPHER = 'aes-256-cbc';
35
36
    /**
37
     * Specify sha256 for message authentication
38
     *
39
     * @var string
40
     */
41
    const CHKSUM = 'sha256';
42
}
43