Code Duplication    Length = 11-11 lines in 2 locations

src/Envelope/ItemDecorator.php 1 location

@@ 60-70 (lines=11) @@
57
        );
58
    }
59
60
    protected function decrypt($data)
61
    {
62
        if (!$data instanceof EncryptedValue) return null;
63
64
        return unserialize($this->decryptString(
65
            $data->getCipherText(),
66
            $data->getMethod(),
67
            $this->decryptEnvelopeKey($data->getEnvelopeKey()),
68
            $data->getInitializationVector()
69
        ));
70
    }
71
72
    private function setPublicKey($cert)
73
    {

src/Password/ItemDecorator.php 1 location

@@ 45-55 (lines=11) @@
42
        );
43
    }
44
45
    protected function decrypt($data)
46
    {
47
        if (!$data instanceof EncryptedValue) return null;
48
49
        return unserialize($this->decryptString(
50
            $data->getCipherText(),
51
            $data->getMethod(),
52
            $this->password,
53
            $data->getInitializationVector()
54
        ));
55
    }
56
57
    private function authenticate($key, $cipherText)
58
    {