diff --git a/README.md b/README.md index 6deb24d..1d06864 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Windwork 加密解密组件 可逆加密算法组件封装,目前支持AzDG、XxTea算法。 ``` -// useage: +// usage: $key = '秘钥'; $txt = '明文~'; @@ -26,7 +26,7 @@ $cfg = [ $crypt = $cfg['class']($cfg); // 4、在Windwork框架中使用 -$crypt = crypt(); +$crypt = \wfCrypt(); ``` diff --git a/composer.json b/composer.json index e86c3fe..7c61874 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ "XXTea", "AzDG" ], - "version" : "1.0.3", + "version" : "1.0.4", + "time" : "2017-06-26 16:30:00", "require" : { "php" : ">=5.5.0" }, @@ -23,6 +24,5 @@ "name" : "Windwork Community", "homepage" : "http://windwork.org" } - ], - "minimum-stability" : "alpha" + ] } \ No newline at end of file diff --git a/lib/strategy/Xxtea.php b/lib/strategy/Xxtea.php index 46be40f..83ff5ef 100644 --- a/lib/strategy/Xxtea.php +++ b/lib/strategy/Xxtea.php @@ -9,8 +9,6 @@ */ namespace wf\crypt\strategy; -use \wf\crypt\Exception; - /** * 基于xxtea加密算法实现 * @@ -39,7 +37,7 @@ public function encrypt($str, $key) } if (!$key || !is_string($key)) { - throw new Exception('[wf\\crypt\\Xxtea::encrypt] param 2 ($key) is required.'); + throw new \wf\crypt\Exception('[wf\\crypt\\Xxtea::encrypt] param 2 ($key) is required.'); } $v = $this->str2long($str, true); @@ -83,7 +81,7 @@ public function decrypt($str, $key) } if (!$key || !is_string($key)) { - throw new Exception('[wf\\crypt\\Xxtea::decrypt] param 2 ($key) is required.'); + throw new \wf\crypt\Exception('[wf\\crypt\\Xxtea::decrypt] param 2 ($key) is required.'); } $v = $this->str2long($str, false); $k = $this->str2long($key, false);