+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
* Base64-encoded ciphertext, or base64-encoded plaintext if encryption is
* disabled or unavailable.
*/
- static function encrypt($string) {
+ public static function encrypt($string) {
if (empty($string)) {
return $string;
}
) {
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, '');
// ECB mode - iv not needed - CRM-8198
- $iv = '00000000000000000000000000000000';
- $ks = mcrypt_enc_get_key_size($td);
+ $iv = '00000000000000000000000000000000';
+ $ks = mcrypt_enc_get_key_size($td);
$key = substr(sha1(CIVICRM_SITE_KEY), 0, $ks);
mcrypt_generic_init($td, $key, $iv);
* Plaintext, or base64-decoded ciphertext if encryption is disabled or
* unavailable.
*/
- static function decrypt($string) {
+ public static function decrypt($string) {
if (empty($string)) {
return $string;
}
) {
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, '');
// ECB mode - iv not needed - CRM-8198
- $iv = '00000000000000000000000000000000';
- $ks = mcrypt_enc_get_key_size($td);
+ $iv = '00000000000000000000000000000000';
+ $ks = mcrypt_enc_get_key_size($td);
$key = substr(sha1(CIVICRM_SITE_KEY), 0, $ks);
mcrypt_generic_init($td, $key, $iv);
return $string;
}
-}
+}