Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nlt-pufa-interface
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
邓梁
nlt-pufa-interface
Commits
ae529f43
Commit
ae529f43
authored
Oct 10, 2024
by
dliangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加密编码
parent
a7e90556
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
model/http_body.go
+1
-1
No files found.
model/http_body.go
View file @
ae529f43
...
@@ -84,7 +84,7 @@ func EncryptAndSign[T any](resp HttpBodyResp[T]) (CryptHttpBodyResp, error) {
...
@@ -84,7 +84,7 @@ func EncryptAndSign[T any](resp HttpBodyResp[T]) (CryptHttpBodyResp, error) {
return
cresp
,
err
return
cresp
,
err
}
}
ciphertext
,
err
:=
publicKey
.
EncryptAsn1
(
body
,
rand
.
Reader
)
ciphertext
,
err
:=
sm2
.
Encrypt
(
&
publicKey
,
body
,
rand
.
Reader
,
sm2
.
C1C3C2
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Println
(
err
)
log
.
Println
(
err
)
return
cresp
,
err
return
cresp
,
err
...
...
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