Code Duplication    Length = 5-5 lines in 2 locations

src/Rijndael.php 1 location

@@ 15-19 (lines=5) @@
12
    {
13
        $keyPart = $this->getKeys();
14
15
        if ($part == 1) {
16
            return substr(hex2bin($keyPart[$keyNumber]), 0, 16);
17
        } else {
18
            return substr(hex2bin($keyPart[$keyNumber]), -16);
19
        }
20
    }
21
22
    public function encrypt($sValue)

src/TripleDes.php 1 location

@@ 16-20 (lines=5) @@
13
        $keyPart = $this->getKeys();
14
        $blockSize = mcrypt_get_block_size(MCRYPT_3DES, MCRYPT_MODE_CBC) * 2;
15
16
        if ($part == 1) {
17
            return substr(hex2bin($keyPart[$keyNumber]), 0, $blockSize);
18
        } else {
19
            return substr(hex2bin($keyPart[$keyNumber]), -$blockSize);
20
        }
21
    }
22
23
    public function encrypt($plainText)