<?php
	
	const SECRET_ENCRYPTION_KEY = 'AppDivyaProductsPOS' ;
	const SECRET_ENCRYPTION_KEY_iv = '1234567891011121';
	const CIP = 'AES-128-CTR';

	class EnqDeq extends Header
	{	
		 
		function mcEncrypt($text)
		{  
			
			$iv_length = openssl_cipher_iv_length(CIP); 
			$options = 0; 
			$encryption = openssl_encrypt($text,CIP,SECRET_ENCRYPTION_KEY, $options, SECRET_ENCRYPTION_KEY_iv);
			return $encryption;
		}
	 
		function mcDecrypt($text)
		{ 
			$iv_length = openssl_cipher_iv_length(CIP); 
			$options = 0; 
			$decryption = openssl_decrypt($text,CIP,SECRET_ENCRYPTION_KEY, $options, SECRET_ENCRYPTION_KEY_iv);

			return $decryption;
		}

		function arrayDecrypt($arry=array())
		{
			$Arr = array();
			$count = count($arry);
			for($var=0;$count>$var;$var++)
			{
				$Arr[] .= $this->mcDecrypt($arry[$var]);
			}
			return $Arr;
		 
		}
	}
?>
