Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
24b00f8d
Commit
24b00f8d
authored
Jun 16, 2020
by
王召彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否是swoft1.x
parent
53323ce0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/Common/Lib/Xcrypt.php
+6
-3
No files found.
src/Common/Lib/Xcrypt.php
View file @
24b00f8d
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
namespace
Hdll\Services\Common\Lib
;
namespace
Hdll\Services\Common\Lib
;
use
Hdll\Services\Common\Config\CfgCenter
;
use
Hdll\Services\Common\Config\CfgCenter
;
use
Swoft\App
;
use
Hdll\Services\V2\Common\Config\CfgCenter
as
CfgCenter2
;
use
Swoft\Redis\Redis
;
class
Xcrypt
class
Xcrypt
{
{
...
@@ -39,7 +38,11 @@ class Xcrypt
...
@@ -39,7 +38,11 @@ class Xcrypt
}
}
private
static
function
getKey
(){
private
static
function
getKey
(){
$key
=
CfgCenter
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
if
(
class_exists
(
'\Swoft\App'
))
{
$key
=
CfgCenter
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
}
else
{
$key
=
CfgCenter2
::
getByOemId
(
CfgCenter
::
ENCRYPT_KEY
,
0
);
}
if
(
empty
(
$key
)){
if
(
empty
(
$key
)){
throw
new
\Exception
(
'加密密钥获取失败!'
);
throw
new
\Exception
(
'加密密钥获取失败!'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment