Skip to content

Commit 09f208d

Browse files
committed
add RSA,AES,DES,3DES
1 parent 3c05ffa commit 09f208d

19 files changed

Lines changed: 986 additions & 16 deletions

File tree

GodSharp.Encryption.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodSharp.Encryption", "src\
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{3889C1B2-746D-40F8-90F3-5F1E819DBFBB}"
1515
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodSharp.Encryption.Tests", "test\GodSharp.Encryption.Tests\GodSharp.Encryption.Tests.csproj", "{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}"
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CA928813-3446-4345-9A90-F4CD5AA4D0CF}"
19+
ProjectSection(SolutionItems) = preProject
20+
.gitignore = .gitignore
21+
LICENSE = LICENSE
22+
README.md = README.md
23+
EndProjectSection
24+
EndProject
1625
Global
1726
GlobalSection(SharedMSBuildProjectFiles) = preSolution
1827
src\GodSharp.Shared\GodSharp.Shared.projitems*{8f6e52f3-db35-40b8-867a-ad312791bb63}*SharedItemsImports = 13
@@ -26,6 +35,10 @@ Global
2635
{778633B1-7023-4975-8028-EB8645CD9BA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
2736
{778633B1-7023-4975-8028-EB8645CD9BA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
2837
{778633B1-7023-4975-8028-EB8645CD9BA9}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Release|Any CPU.Build.0 = Release|Any CPU
2942
EndGlobalSection
3043
GlobalSection(SolutionProperties) = preSolution
3144
HideSolutionNode = FALSE
@@ -34,5 +47,6 @@ Global
3447
{8F6E52F3-DB35-40B8-867A-AD312791BB63} = {3889C1B2-746D-40F8-90F3-5F1E819DBFBB}
3548
{778633B1-7023-4975-8028-EB8645CD9BA9} = {684FCB96-A6FC-45B4-8BE7-13C03D1F464C}
3649
{3889C1B2-746D-40F8-90F3-5F1E819DBFBB} = {684FCB96-A6FC-45B4-8BE7-13C03D1F464C}
50+
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B} = {B76AC3AF-1E8E-4849-9943-67DF77651A6F}
3751
EndGlobalSection
3852
EndGlobal

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,57 @@
11
# GodSharp.Encryption
22
Common encryption method for .NET.
3+
4+
# Hash Algorithm
5+
6+
- MD5
7+
8+
- SHA
9+
- SHA1
10+
- SHA256
11+
- SHA384
12+
- SHA512
13+
14+
15+
- HMAC
16+
- HMACMD5
17+
- HMACRIPEMD160
18+
- HMACSHA1
19+
- HMACSHA256
20+
- HMACSHA384
21+
- HMACSHA512
22+
23+
## Method
24+
25+
- Encrypt()
26+
27+
28+
29+
# Symmetric Encryption Algorithm
30+
31+
- AES
32+
33+
- DES
34+
35+
- 3DES
36+
37+
## Method
38+
39+
- Encrypt()
40+
41+
# Asymmetric Encryption Algorithm
42+
43+
- RSA
44+
45+
## Method
46+
47+
- Encrypt()
48+
49+
- Decrypt()
50+
51+
# Base64
52+
53+
## Method
54+
55+
- Encrypt()
56+
57+
- Decrypt()

src/GodSharp.Encryption/GodSharp.Encryption.csproj

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,65 @@
3939
<Compile Include="..\GodSharp.Shared\Encryption\Asymmetric\RSA.cs">
4040
<Link>Asymmetric\RSA.cs</Link>
4141
</Compile>
42-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\Base64.cs">
43-
<Link>Hash\Base64.cs</Link>
42+
<Compile Include="..\GodSharp.Shared\Encryption\Base64.cs">
43+
<Link>Base64.cs</Link>
44+
</Compile>
45+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMAC.cs">
46+
<Link>Hash\HMAC\HMAC.cs</Link>
47+
</Compile>
48+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACMD5.cs">
49+
<Link>Hash\HMAC\HMACMD5.cs</Link>
50+
</Compile>
51+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACRIPEMD160.cs">
52+
<Link>Hash\HMAC\HMACRIPEMD160.cs</Link>
53+
</Compile>
54+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA1.cs">
55+
<Link>Hash\HMAC\HMACSHA1.cs</Link>
56+
</Compile>
57+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA256.cs">
58+
<Link>Hash\HMAC\HMACSHA256.cs</Link>
59+
</Compile>
60+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA384.cs">
61+
<Link>Hash\HMAC\HMACSHA384.cs</Link>
62+
</Compile>
63+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA512.cs">
64+
<Link>Hash\HMAC\HMACSHA512.cs</Link>
4465
</Compile>
4566
<Compile Include="..\GodSharp.Shared\Encryption\Hash\MD5.cs">
4667
<Link>Hash\MD5.cs</Link>
4768
</Compile>
48-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA1.cs">
49-
<Link>Hash\SHA1.cs</Link>
69+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA.cs">
70+
<Link>Hash\SHA\SHA.cs</Link>
71+
</Compile>
72+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA1.cs">
73+
<Link>Hash\SHA\SHA1.cs</Link>
5074
</Compile>
51-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA256.cs">
52-
<Link>Hash\SHA256.cs</Link>
75+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA256.cs">
76+
<Link>Hash\SHA\SHA256.cs</Link>
5377
</Compile>
54-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA384.cs">
55-
<Link>Hash\SHA384.cs</Link>
78+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA384.cs">
79+
<Link>Hash\SHA\SHA384.cs</Link>
5680
</Compile>
57-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA512.cs">
58-
<Link>Hash\SHA512.cs</Link>
81+
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA512.cs">
82+
<Link>Hash\SHA\SHA512.cs</Link>
5983
</Compile>
6084
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\AES.cs">
6185
<Link>Symmetric\AES.cs</Link>
6286
</Compile>
6387
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\DES.cs">
6488
<Link>Symmetric\DES.cs</Link>
6589
</Compile>
90+
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\TripleDES.cs">
91+
<Link>Symmetric\TripleDES.cs</Link>
92+
</Compile>
93+
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\XES.cs">
94+
<Link>Symmetric\XES.cs</Link>
95+
</Compile>
96+
<Compile Include="..\GodSharp.Shared\Encryption\Util\Util.cs">
97+
<Link>Util\Util.cs</Link>
98+
</Compile>
6699
<Compile Include="Properties\AssemblyInfo.cs" />
67100
</ItemGroup>
101+
<ItemGroup />
68102
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
69103
</Project>

0 commit comments

Comments
 (0)