remove debug code
authorStricted <info@stricted.net>
Sun, 5 Feb 2017 12:21:18 +0000 (13:21 +0100)
committerStricted <info@stricted.net>
Sun, 5 Feb 2017 12:21:18 +0000 (13:21 +0100)
SpeedportHybrid.class.php
lib/trait/CryptLib.class.php

index 06030a604a17300de2ad28ae981503ee59dff703..c135643cd5163d77b29c03fef5f52a4a9e0d8315 100644 (file)
@@ -121,6 +121,7 @@ class SpeedportHybrid {
                
                if (!empty($fields)) {
                        curl_setopt($ch, CURLOPT_POST, true);
+                       
                        if (is_array($fields)) {
                                curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
                        }
index fb89e96d257f5c56bce70dc5db398f2b35fbbe83..e321b5122c43edbcd5d35a6f89b86fcd9cba2e81 100644 (file)
@@ -42,7 +42,6 @@ trait CryptLib {
                        $aes = $factory->getBlockCipher('rijndael-128');
                        $aes->setKey($key);
                        $mode = $factory->getMode('ccm', $aes, $iv, [ 'adata' => $adata, 'lSize' => 7]);
-                       
                        $mode->decrypt($enc);
                        
                        return $mode->finish();
@@ -67,6 +66,7 @@ trait CryptLib {
                if (PHP_VERSION_ID >= 70100) {
                        $tag = null;
                        $encdata = openssl_encrypt($data, 'aes-128-ccm', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv, $tag, $adata, 8);
+                       
                        return bin2hex($encdata . $tag);
                }
                else {
@@ -75,7 +75,7 @@ trait CryptLib {
                        $aes->setKey($key);
                        $mode = $factory->getMode('ccm', $aes, $iv, [ 'adata' => $adata, 'lSize' => 7]);
                        $mode->encrypt($data);
-                       var_dump(bin2hex($mode->finish()));
+                       
                        return bin2hex($mode->finish());
                }
        }