Code Duplication    Length = 13-13 lines in 2 locations

includes/libraries/phpcrypt/ciphers/Skipjack.php 2 locations

@@ 174-186 (lines=13) @@
171
172
        if ($this->operation() == parent::ENCRYPT)
173
        {
174
            for ($i = 0; $i < 4; ++$i)
175
            {
176
                if ($i == 0 || $i == 2)
177
                {
178
                    $pos = $right ^ $this->str2Dec($key[$i]);
179
                    $left = $left ^ self::$_f[$pos];
180
                } else
181
                {
182
                    $pos = $left ^ $this->str2Dec($key[$i]);
183
                    $right = $right ^ self::$_f[$pos];
184
                }
185
            }
186
        } else // parent::DECRYPT
187
        {
188
            // we do the same as in encryption, but apply the key backwards,
189
            // from key[3] to key[0]
@@ 190-202 (lines=13) @@
187
        {
188
            // we do the same as in encryption, but apply the key backwards,
189
            // from key[3] to key[0]
190
            for ($i = 3; $i >= 0; --$i)
191
            {
192
                if ($i == 0 || $i == 2)
193
                {
194
                    $pos = $right ^ $this->str2Dec($key[$i]);
195
                    $left = $left ^ self::$_f[$pos];
196
                } else
197
                {
198
                    $pos = $left ^ $this->str2Dec($key[$i]);
199
                    $right = $right ^ self::$_f[$pos];
200
                }
201
            }
202
        }
203
204
        return $this->dec2Str($left).$this->dec2Str($right);
205
    }