<commit_before><?php
/*///////////////////////////////////////////////////////////////
 /** ID: | /-- ID: Indonesia
 /** EN: | /-- EN: English
 ///////////////////////////////////////////////////////////////*/

/**
 * Session - Library untuk framework kecik, library ini khusus untuk membantu masalah session 
 *
 * @author 		<NAME>
 * @copyright 	2015 <NAME>
 * @link 		http://github.com/kecik-framework/session
 * @license		MIT
 * @version 	1.0.1-alpha
 * @package		Kecik\Session
 **/
namespace Kecik;

/**
 * Session
 * @package 	Kecik\Session
 * @author 		<NAME>
 * @since 		1.0.0-alpha
 **/
class Session {
	/**
	 * @var bool $status
	 **/
	private $status = FALSE;

	/**
	 * @var string $key
	 **/

	private $key;
	/**
	 * @var string $iv
	 **/
	private $iv;
	
	/**
	 * @var Konstata untuk Limiter Session
	 **/
	const LIMITER_PUBLIC	= 'public';
	const LIMITER_PRIVATE 	= 'private';
	const LIMITER_PRIVATE_NO= 'private_no_expire';
	const LIMITER_NO_CACHE	= 'nocache';

	/**
	 * @var Konstanta untuk status session
	 **/
	const STATUS_DISABLED 	= PHP_SESSION_DISABLED;
	const STATUS_NONE		= PHP_SESSION_NONE;
	const STATUS_ACTIVE		= PHP_SESSION_ACTIVE;

	/**
 	 * __construct
 	 * @param Kecik $app
 	 **/
	public function __construct(Kecik $app) {
		session_start();
		$config = $app->config;
		if ( empty( $this->status = $config->get('session.encrypt') ) )
			$this->status = FALSE;
		else { 
			if ( empty( $key = $config->get('session.encrypt.key') ) )
				$this->key = pack('H*', $key);
			else
				$this->key = pack('H*', "bcb04b7e103a0cd8b54763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3");<commit_msg>Fix Bug for php 5.4<commit_after><?php
/*///////////////////////////////////////////////////////////////
 /** ID: | /-- ID: Indonesia
 /** EN: | /-- EN: English
 ///////////////////////////////////////////////////////////////*/

/**
 * Session - Library untuk framework kecik, library ini khusus untuk membantu masalah session 
 *
 * @author 		<NAME>
 * @copyright 	2015 <NAME> Isp
 * @link 		http://github.com/kecik-framework/session
 * @license		MIT
 * @version 	1.0.1-alpha
 * @package		Kecik\Session
 **/
namespace Kecik;

/**
 * Session
 * @package 	Kecik\Session
 * @author 		<NAME>sp
 * @since 		1.0.0-alpha
 **/
class Session {
	/**
	 * @var bool $status
	 **/
	private $status = FALSE;

	/**
	 * @var string $key
	 **/

	private $key;
	/**
	 * @var string $iv
	 **/
	private $iv;
	
	/**
	 * @var Konstata untuk Limiter Session
	 **/
	const LIMITER_PUBLIC	= 'public';
	const LIMITER_PRIVATE 	= 'private';
	const LIMITER_PRIVATE_NO= 'private_no_expire';
	const LIMITER_NO_CACHE	= 'nocache';

	/**
	 * @var Konstanta untuk status session
	 **/
	const STATUS_DISABLED 	= PHP_SESSION_DISABLED;
	const STATUS_NONE		= PHP_SESSION_NONE;
	const STATUS_ACTIVE		= PHP_SESSION_ACTIVE;

	/**
 	 * __construct
 	 * @param Kecik $app
 	 **/
	public function __construct(Kecik $app) {
		session_start();
		$config = $app->config;
		$this->status = $config->get('session.encrypt');
		if ( empty( $this->status ) )
			$this->status = FALSE;
		else { 
			$key = $config->get('session.encrypt.key');
			if ( empty( $key ) )
				$this->key = pack('H*', $key);
			else
				$this->key = pack('H*', "bcb04b7e103a0cd8b54763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3");
{'fraction_non_alphanumeric': 0.22749540722596448, 'fraction_numerical': 0.02694427434170239, 'mean_word_length': 2.378490175801448, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2837696', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1189, 'n_words': 244}