Code Duplication    Length = 2-2 lines in 2 locations

src/Webtrees/Functions/Functions.php 2 locations

@@ 153-154 (lines=2) @@
150
	        throw new \Exception('MCrypt PHP extension is required to use encryption.');
151
	    
152
		$key = 'STANDARDKEYIFNOSERVER';
153
		if(Filter::server('SERVER_NAME') && Filter::server('SERVER_SOFTWARE'))
154
			$key = md5(Filter::server('SERVER_NAME').Filter::server('SERVER_SOFTWARE'));
155
		$iv = mcrypt_create_iv(self::ENCRYPTION_IV_SIZE, MCRYPT_RAND);
156
		$id = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC,$iv);
157
		$encrypted = base64_encode($iv.$id);
@@ 176-177 (lines=2) @@
173
	        throw new \Exception('MCrypt PHP extension is required to use encryption.');
174
	    
175
		$key = 'STANDARDKEYIFNOSERVER';
176
		if(Filter::server('SERVER_NAME') && Filter::server('SERVER_SOFTWARE'))
177
			$key = md5(Filter::server('SERVER_NAME').Filter::server('SERVER_SOFTWARE'));
178
		$encrypted = str_replace('-', '+', $encrypted);
179
		$encrypted = str_replace('_', '/', $encrypted);
180
		$encrypted = str_replace('*', '=', $encrypted);