Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-common
Commits
3e071612
Commit
3e071612
authored
Jun 25, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "feat:价格xxtea"
This reverts commit
4cfd291e
.
parent
4cfd291e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
11 deletions
+0
-11
go.mod
go.mod
+0
-1
go.sum
go.sum
+0
-2
encrypt.go
utils/encrypt.go
+0
-8
No files found.
go.mod
View file @
3e071612
...
@@ -58,7 +58,6 @@ require (
...
@@ -58,7 +58,6 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.479 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ims v1.0.479 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ims v1.0.479 // indirect
github.com/tencentyun/tls-sig-api-v2-golang v1.0.0 // indirect
github.com/tencentyun/tls-sig-api-v2-golang v1.0.0 // indirect
github.com/xxtea/xxtea-go v1.0.0 // indirect
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/text v0.3.6 // indirect
...
...
go.sum
View file @
3e071612
...
@@ -228,8 +228,6 @@ github.com/tencentyun/tls-sig-api-v2-golang v1.1.0 h1:dWbCuoTaRWvcS/RWW/8RIAvLRA
...
@@ -228,8 +228,6 @@ github.com/tencentyun/tls-sig-api-v2-golang v1.1.0 h1:dWbCuoTaRWvcS/RWW/8RIAvLRA
github.com/tencentyun/tls-sig-api-v2-golang v1.1.0/go.mod h1:D/i1nQrP1hSXxxz+SAmjaprAwH3EhYaktJG6BObWnFE=
github.com/tencentyun/tls-sig-api-v2-golang v1.1.0/go.mod h1:D/i1nQrP1hSXxxz+SAmjaprAwH3EhYaktJG6BObWnFE=
github.com/tencentyun/tls-sig-api-v2-golang v1.3.0 h1:mW4onVqOP6MqkJtTay74Tch6NvjwQRXeCuhUC/p6YYk=
github.com/tencentyun/tls-sig-api-v2-golang v1.3.0 h1:mW4onVqOP6MqkJtTay74Tch6NvjwQRXeCuhUC/p6YYk=
github.com/tencentyun/tls-sig-api-v2-golang v1.3.0/go.mod h1:0L1MSijyEq6a74xZ02h0qKfN8y6RcvDiNabIZWXereE=
github.com/tencentyun/tls-sig-api-v2-golang v1.3.0/go.mod h1:0L1MSijyEq6a74xZ02h0qKfN8y6RcvDiNabIZWXereE=
github.com/xxtea/xxtea-go v1.0.0 h1:HUeElH97FsZS/+l+iroj0lhosKe47VMtdIL2Lz3MeFg=
github.com/xxtea/xxtea-go v1.0.0/go.mod h1:2uvuCBt0VXxijrX5ieiAeeNT2+2MIsrs1DI9iXz7OOQ=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
...
...
utils/encrypt.go
View file @
3e071612
...
@@ -7,7 +7,6 @@ import (
...
@@ -7,7 +7,6 @@ import (
"encoding/base64"
"encoding/base64"
"encoding/json"
"encoding/json"
"errors"
"errors"
"github.com/xxtea/xxtea-go/xxtea"
)
)
func
EncryptionData
(
data
interface
{},
aeskey
[]
byte
)
string
{
func
EncryptionData
(
data
interface
{},
aeskey
[]
byte
)
string
{
...
@@ -84,10 +83,3 @@ func pKCS5UnPadding(origData []byte) []byte {
...
@@ -84,10 +83,3 @@ func pKCS5UnPadding(origData []byte) []byte {
unpadding
:=
int
(
origData
[
length
-
1
])
unpadding
:=
int
(
origData
[
length
-
1
])
return
origData
[
:
(
length
-
unpadding
)]
return
origData
[
:
(
length
-
unpadding
)]
}
}
func
EncryptionData2
(
data
interface
{},
key
[]
byte
)
string
{
str
,
_
:=
json
.
Marshal
(
data
)
encrypted
:=
xxtea
.
Encrypt
(
str
,
key
)
base64Str
:=
base64
.
StdEncoding
.
EncodeToString
(
encrypted
)
return
string
(
base64Str
)
}
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