Code

Updated mcrypt_init
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Dec 2007 09:04:27 +0000 (09:04 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Dec 2007 09:04:27 +0000 (09:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8053 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_socketClient.inc

index 2df0b43280cc9afbed9c051ab2e2242056363034..d31e6764f50b6c8cfb73b2e9021dab32c1c15831 100755 (executable)
@@ -41,8 +41,6 @@ class Socket_Client
 
                if ($this->connected()){
                        $this->ckey = substr(md5($key), 0, $this->ks);
-                       echo "Key: $this->ckey\n";
-                       mcrypt_generic_init($this->td, $this->ckey, $this->iv);
                        return TRUE;
                }
 
@@ -52,6 +50,7 @@ class Socket_Client
 
        private function encrypt($data)
        {
+               mcrypt_generic_init($this->td, $this->ckey, $this->iv);
                return mcrypt_generic($this->td, $data);
        }
 
@@ -59,6 +58,7 @@ class Socket_Client
        private function decrypt($data)
        {
                /* decrypt data */
+               mcrypt_generic_init($this->td, $this->ckey, $this->iv);
                return mdecrypt_generic($this->td, $data);
        }