HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/NVonken/mijneigenlied.com/wwwroot/Core/Core Parts/encryption.part.php
<?php

	class Encryption
	{
	
		private static $_iv = "K0sdlco32fsaFmpP9dn7nqLn3dkSnv83";
		private static $_key = "Dial93VlqgNdf3IflAladfnLie2o8iNC";

        /**
         * Encrypt a string
         * @static
         * @param string $text string to encrypt
         * @return string encrypted string
         */
		public static function Encrypt($text)
		{
			$cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');	
			
			if (mcrypt_generic_init($cipher, Encryption::$_key, Encryption::$_iv) !== false)
			{
				
				$encryptedText = mcrypt_generic($cipher, $text);
				mcrypt_generic_deinit($cipher);
				return bin2hex($encryptedText);
			}
			
			return "ERROR";
		}

        /**
         * Decrypt a string
         * @static
         * @param string $text
         * @return string Decrypted text
         */
		public static function Decrypt($text)
		{
			$cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');
			
			if (mcrypt_generic_init($cipher, Encryption::$_key, Encryption::$_iv) !== false)
			{
				
				$decryptedText = mdecrypt_generic($cipher, General::hex2bin($text));
				mcrypt_generic_deinit($cipher);
				return $decryptedText;
			}
			
			return "ERROR";
		}
	}
	
?>