Code Duplication    Length = 9-9 lines in 2 locations

lib/Cpdf.php 2 locations

@@ 1973-1981 (lines=9) @@
1970
1971
                $len = mb_strlen($info['owner'], '8bit');
1972
1973
                if ($len > 32) {
1974
                    $owner = substr($info['owner'], 0, 32);
1975
                } else {
1976
                    if ($len < 32) {
1977
                        $owner = $info['owner'] . substr($pad, 0, 32 - $len);
1978
                    } else {
1979
                        $owner = $info['owner'];
1980
                    }
1981
                }
1982
1983
                $len = mb_strlen($info['user'], '8bit');
1984
                if ($len > 32) {
@@ 1984-1992 (lines=9) @@
1981
                }
1982
1983
                $len = mb_strlen($info['user'], '8bit');
1984
                if ($len > 32) {
1985
                    $user = substr($info['user'], 0, 32);
1986
                } else {
1987
                    if ($len < 32) {
1988
                        $user = $info['user'] . substr($pad, 0, 32 - $len);
1989
                    } else {
1990
                        $user = $info['user'];
1991
                    }
1992
                }
1993
1994
                $tmp = $this->md5_16($owner);
1995
                $okey = substr($tmp, 0, 5);