protected static function mcryptOptions($options)
	{
		$options_default = array(
			'cipher'	=> MCRYPT_RIJNDAEL_128,
			'mode'		=> MCRYPT_MODE_CBC,
			// encryption options
			'return_base64' => true,		// return cryptText base64_encoded
			'rand_src'	=> MCRYPT_RAND,
			'padding'	=> 'PKCS5',			// only applies with MCRYPT_MODE_CBC, see $padding_methods for values
			'iv'		=> null,			// usually randomly generated
			'iv_return'	=> true,			// can only be disabled when passing iv
		);
		$options = array_merge($options_default, $options);
		$options['iv_size']= mcrypt_get_iv_size($options['cipher'], $options['mode']);
		$options['key_size'] = mcrypt_get_key_size($options['cipher'], $options['mode']);
		$options['block_size'] = mcrypt_get_block_size($options['cipher'], $options['mode']);
		#$debug->log('iv_size', $options['iv_size']);
		#$debug->log('key_size', $options['key_size']);
		#$debug->log('block_size', $options['block_size']);
		return $options;
	}