Pdf14Encryption   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 37
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A writeAdditionalEncryptDictionaryEntries() 0 7 1
A getRevision() 0 4 1
A getAlgorithm() 0 4 1
A getKeyLength() 0 4 1
1
<?php
2
/**
3
 * BaconPdf
4
 *
5
 * @link      http://github.com/Bacon/BaconPdf For the canonical source repository
6
 * @copyright 2015 Ben Scholzen (DASPRiD)
7
 * @license   http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
8
 */
9
10
namespace Bacon\Pdf\Encryption;
11
12
use Bacon\Pdf\Writer\ObjectWriter;
13
14
/**
15
 * Encryption for handling PDF version 1.4 and above.
16
 */
17
class Pdf14Encryption extends Pdf11Encryption
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected function writeAdditionalEncryptDictionaryEntries(ObjectWriter $objectWriter)
23
    {
24
        parent::writeAdditionalEncryptDictionaryEntries($objectWriter);
25
26
        $objectWriter->writeName('Length');
27
        $objectWriter->writeNumber(128);
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    protected function getRevision()
34
    {
35
        return 3;
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    protected function getAlgorithm()
42
    {
43
        return 2;
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    protected function getKeyLength()
50
    {
51
        return 128;
52
    }
53
}
54