<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class UjiCoba extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		$this->load->library('UnilaSecure');
		$this->load->model('AuthModel');
	}
	public function index()
	{
		echo 'Try Page';
	}

	public function UnilaSecureClientArray() 
	{
		$id_client = 'uptbahasa_unila';
		$key = 'keZpBpkUAzAx7eY5FY1-pXZlw3k3VHvQXNVrwZfbZ2s';
		$npm = '0517032014';

		$data = array(
			'id_client' => $id_client,
			'type' => 'GET_DATA_MHS',
			'npm' => $npm
			);

		$encypt = $this->unilasecure->encrypt_client_arr($data, $key);
		echo "<pre>";
		echo $encypt;
		echo "<br>";

		$decypt = $this->unilasecure->decrypt_client_arr($encypt, $key);
		print_r($decypt);

	}

	public function form_data()
	{
		$this->load->view('form_data');
	}
}
