Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
20ad23ac
Commit
20ad23ac
authored
Aug 06, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
2231c82f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
205 additions
and
128 deletions
+205
-128
Config.cs
Mall.Common/Config.cs
+23
-0
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+182
-128
No files found.
Mall.Common/Config.cs
View file @
20ad23ac
...
...
@@ -21,6 +21,7 @@ using System.Threading.Tasks;
using
System.Web
;
using
Microsoft.Extensions.Hosting
;
using
System.Drawing
;
using
System.Security.Cryptography
;
namespace
Mall.Common
{
...
...
@@ -833,5 +834,27 @@ namespace Mall.Common
}
}
/// <summary>
/// 获取hash值
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public
static
string
GetHash
(
string
value
)
{
string
result
=
""
;
using
(
var
md5Hash
=
MD5
.
Create
())
{
byte
[]
data
=
md5Hash
.
ComputeHash
(
Encoding
.
UTF8
.
GetBytes
(
value
));
StringBuilder
builder
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
data
.
Length
;
i
++)
{
builder
.
Append
(
data
[
i
].
ToString
(
"x2"
));
//使用小写字母表示每个字节的十六进制值
}
result
=
builder
.
ToString
();
}
return
result
;
}
}
}
\ No newline at end of file
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
20ad23ac
This diff is collapsed.
Click to expand it.
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