if (!defined('SHOP_TO_DATE')) die(HTTP_FORBIDDEN); include_once(WEBSERVICE_PATH . "hordeblowfish.php"); class blowfish { var $cipher; function blowfish($secret_key) { $this->cipher = &Horde_Cipher::factory('blowfish'); $this->cipher->setKey($secret_key); } function encrypt($data) { return base64_encode($this->cipher->encrypt($data)); } function decrypt($data) { return $this->cipher->decrypt(base64_decode($data)); } } ?>