Code Duplication    Length = 8-8 lines in 2 locations

src/Intraface/LegacyCpdf.php 2 locations

@@ 1486-1493 (lines=8) @@
1483
        
1484
        if ($this->encryptionMode > 1) {
1485
            $len = strlen($ownerKey);
1486
            for ($i = 1; $i<=19; ++$i) {
1487
                $ek = '';
1488
                for ($j=0; $j < $len; $j++) {
1489
                    $ek .= chr(ord($ownerKey[$j]) ^ $i);
1490
                }
1491
                $this->ARC4_init($ek);
1492
                $ovalue = $this->ARC4($ovalue);
1493
            }
1494
        }
1495
        return $ovalue;
1496
    }
@@ 1532-1539 (lines=8) @@
1529
            $uvalue=$this->ARC4($userHash);
1530
            
1531
            $len = strlen($this->encryptionKey);
1532
            for ($i = 1; $i<=19; ++$i) {
1533
                $ek = '';
1534
                for ($j=0; $j< $len; $j++) {
1535
                    $ek .= chr(ord($this->encryptionKey[$j]) ^ $i);
1536
                }
1537
                $this->ARC4_init($ek);
1538
                $uvalue = $this->ARC4($uvalue);
1539
            }
1540
            $uvalue .= substr($this->encryptionPad, 0, 16);
1541
            
1542
            //$this->encryptionKey = $encryptionKey;