summaryrefslogtreecommitdiffstats
path: root/tests/mocks/libraries/encryption.php
blob: 028eecc72bfe0c7a2ca37580d62fc2e4b79766b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

class Mock_Libraries_Encryption extends CI_Encryption {

	/**
	 * __get_params()
	 *
	 * Allows public calls to the otherwise protected _get_params().
	 */
	public function __get_params($params)
	{
		return $this->_get_params($params);
	}

	// --------------------------------------------------------------------

	/**
	 * get_key()
	 *
	 * Allows checking for key changes.
	 */
	public function get_key()
	{
		return $this->_key;
	}

	// --------------------------------------------------------------------

	/**
	 * __driver_get_handle()
	 *
	 * Allows checking for _mcrypt_get_handle(), _openssl_get_handle()
	 */
	public function __driver_get_handle($driver, $cipher, $mode)
	{
		return $this->{'_'.$driver.'_get_handle'}($cipher, $mode);
	}

}