Skip to content

Commit 6ef7a55

Browse files
committed
support netcore
1 parent a9596a5 commit 6ef7a55

37 files changed

Lines changed: 258 additions & 378 deletions

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dlldata.c
4242

4343
# DNX
4444
project.lock.json
45+
project.fragment.lock.json
4546
artifacts/
4647

4748
*_i.c
@@ -142,7 +143,7 @@ publish/
142143
*.azurePubxml
143144
# TODO: Comment the next line if you want to checkin your web deploy settings
144145
# but database connection strings (with potential passwords) will be unencrypted
145-
*.pubxml
146+
#*.pubxml
146147
*.publishproj
147148

148149
# Microsoft Azure Web App publish settings. Comment the next line if you want to
@@ -188,6 +189,7 @@ ClientBin/
188189
*~
189190
*.dbmdl
190191
*.dbproj.schemaview
192+
*.jfm
191193
*.pfx
192194
*.publishsettings
193195
node_modules/
@@ -250,3 +252,12 @@ paket-files/
250252
# JetBrains Rider
251253
.idea/
252254
*.sln.iml
255+
256+
# CodeRush
257+
.cr/
258+
259+
# Python Tools for Visual Studio (PTVS)
260+
__pycache__/
261+
*.pyc
262+
263+
output/

GodSharp.Encryption.sln

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,45 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26403.0
4+
VisualStudioVersion = 15.0.27130.2024
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{684FCB96-A6FC-45B4-8BE7-13C03D1F464C}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{365F3D50-DBAF-4B06-BDCB-6F60E4AD2418}"
77
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B76AC3AF-1E8E-4849-9943-67DF77651A6F}"
9-
EndProject
10-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GodSharp.Shared", "src\GodSharp.Shared\GodSharp.Shared.shproj", "{8F6E52F3-DB35-40B8-867A-AD312791BB63}"
11-
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodSharp.Encryption", "src\GodSharp.Encryption\GodSharp.Encryption.csproj", "{778633B1-7023-4975-8028-EB8645CD9BA9}"
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{D94E875E-7D01-432C-B44A-95BC632D3880}"
9+
ProjectSection(SolutionItems) = preProject
10+
build\common.props = build\common.props
11+
build\version.props = build\version.props
12+
EndProjectSection
1313
EndProject
14-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{3889C1B2-746D-40F8-90F3-5F1E819DBFBB}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodSharp.Encryption", "src\GodSharp.Encryption\GodSharp.Encryption.csproj", "{EA23E6BF-07FA-4BA1-902D-B507A83458BC}"
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}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GodSharp.Encryption.Test", "test\GodSharp.Encryption.Test\GodSharp.Encryption.Test.csproj", "{A552D3A1-2CCD-4B4A-8EE1-E3E721CB0FF9}"
1717
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-
appveyor.yml = appveyor.yml
22-
LICENSE = LICENSE
23-
README.md = README.md
24-
EndProjectSection
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{FF20D902-2537-4F14-88BE-7DDAC879E7F8}"
2519
EndProject
2620
Global
27-
GlobalSection(SharedMSBuildProjectFiles) = preSolution
28-
src\GodSharp.Shared\GodSharp.Shared.projitems*{8f6e52f3-db35-40b8-867a-ad312791bb63}*SharedItemsImports = 13
29-
EndGlobalSection
3021
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3122
Debug|Any CPU = Debug|Any CPU
3223
Release|Any CPU = Release|Any CPU
3324
EndGlobalSection
3425
GlobalSection(ProjectConfigurationPlatforms) = postSolution
35-
{778633B1-7023-4975-8028-EB8645CD9BA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36-
{778633B1-7023-4975-8028-EB8645CD9BA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
37-
{778633B1-7023-4975-8028-EB8645CD9BA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
38-
{778633B1-7023-4975-8028-EB8645CD9BA9}.Release|Any CPU.Build.0 = Release|Any CPU
39-
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40-
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
41-
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
42-
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{EA23E6BF-07FA-4BA1-902D-B507A83458BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{EA23E6BF-07FA-4BA1-902D-B507A83458BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{EA23E6BF-07FA-4BA1-902D-B507A83458BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{EA23E6BF-07FA-4BA1-902D-B507A83458BC}.Release|Any CPU.Build.0 = Release|Any CPU
30+
{A552D3A1-2CCD-4B4A-8EE1-E3E721CB0FF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31+
{A552D3A1-2CCD-4B4A-8EE1-E3E721CB0FF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{A552D3A1-2CCD-4B4A-8EE1-E3E721CB0FF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
33+
{A552D3A1-2CCD-4B4A-8EE1-E3E721CB0FF9}.Release|Any CPU.Build.0 = Release|Any CPU
4334
EndGlobalSection
4435
GlobalSection(SolutionProperties) = preSolution
4536
HideSolutionNode = FALSE
4637
EndGlobalSection
4738
GlobalSection(NestedProjects) = preSolution
48-
{8F6E52F3-DB35-40B8-867A-AD312791BB63} = {3889C1B2-746D-40F8-90F3-5F1E819DBFBB}
49-
{778633B1-7023-4975-8028-EB8645CD9BA9} = {684FCB96-A6FC-45B4-8BE7-13C03D1F464C}
50-
{3889C1B2-746D-40F8-90F3-5F1E819DBFBB} = {684FCB96-A6FC-45B4-8BE7-13C03D1F464C}
51-
{7DC293CD-50BB-4AAD-AF6E-9CB4DA3A2C8B} = {B76AC3AF-1E8E-4849-9943-67DF77651A6F}
39+
{EA23E6BF-07FA-4BA1-902D-B507A83458BC} = {365F3D50-DBAF-4B06-BDCB-6F60E4AD2418}
40+
{A552D3A1-2CCD-4B4A-8EE1-E3E721CB0FF9} = {FF20D902-2537-4F14-88BE-7DDAC879E7F8}
41+
EndGlobalSection
42+
GlobalSection(ExtensibilityGlobals) = postSolution
43+
SolutionGuid = {DB0E14D2-B1C1-4E84-B8B6-838721241758}
5244
EndGlobalSection
5345
EndGlobal

build/common.props

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project>
2+
3+
<Import Project=".\version.props" />
4+
5+
<PropertyGroup>
6+
<RootNamespace>GodSharp.Encryption</RootNamespace>
7+
<Company>GodSharp</Company>
8+
<Authors>seayxu</Authors>
9+
<RepositoryType>git</RepositoryType>
10+
<RepositoryUrl>https://github.com/godsharp/GodSharp.Encryption.git</RepositoryUrl>
11+
<PackageProjectUrl>https://github.com/godsharp/GodSharp.Encryption</PackageProjectUrl>
12+
<PackageIconUrl>https://avatars3.githubusercontent.com/u/26563296</PackageIconUrl>
13+
<PackageLicenseUrl>https://github.com/godsharp/GodSharp.Encryption/blob/master/LICENSE</PackageLicenseUrl>
14+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
15+
<Copyright>Copyright © GodSharp 2017</Copyright>
16+
<NeutralLanguage>en-US</NeutralLanguage>
17+
<OutputPath>$(SolutionDir)\output\$(AssemblyName)</OutputPath>
18+
<DocumentationFile>$(SolutionDir)\output\$(AssemblyName)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
19+
<DebugSymbols>true</DebugSymbols>
20+
<TargetFrameworks Condition="'$(LibraryFrameworks)'==''">net35;net40;net45;net46;net47;netstandard2.0;</TargetFrameworks>
21+
<!--<TargetFrameworks Condition="'$(LibraryFrameworks)'==''">net35;net40;net45;net46;net47;</TargetFrameworks>-->
22+
<TargetFrameworks Condition="'$(LibraryFrameworks)'!=''">$(LibraryFrameworks)</TargetFrameworks>
23+
</PropertyGroup>
24+
</Project>

build/version.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<PropertyGroup Condition="'$(AssemblyName)'=='GodSharp.Encryption'">
3+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
4+
<Version>1.0.1</Version>
5+
<FileVersion>1.0.1</FileVersion>
6+
<DocumentationFile>$(SolutionDir)\output\$(AssemblyName)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
7+
</PropertyGroup>
8+
</Project>
File renamed without changes.
Lines changed: 42 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,52 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="..\..\build\common.props" />
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{778633B1-7023-4975-8028-EB8645CD9BA9}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>GodSharp</RootNamespace>
114
<AssemblyName>GodSharp.Encryption</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
5+
<Title>GodSharp.Encryption</Title>
6+
<PackageId>GodSharp.Encryption</PackageId>
7+
<PackageTags>GodSharp.Encryption,Encryption,GodSharp</PackageTags>
8+
<Description>Common encryption method for .NET</Description>
159
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
10+
<PropertyGroup Condition="'$(TargetFramework)'=='net35'">
11+
<DefineConstants>NFX;NET35;$(AdditionalConstants)</DefineConstants>
2412
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
13+
<PropertyGroup Condition="'$(TargetFramework)'=='net40'">
14+
<DefineConstants>NFX;NET40;$(AdditionalConstants)</DefineConstants>
3215
</PropertyGroup>
33-
<ItemGroup>
16+
<PropertyGroup Condition="'$(TargetFramework)'=='net45'">
17+
<DefineConstants>NFX;NET45;$(AdditionalConstants)</DefineConstants>
18+
</PropertyGroup>
19+
<PropertyGroup Condition="'$(TargetFramework)'=='net46'">
20+
<DefineConstants>NFX;NET46;$(AdditionalConstants)</DefineConstants>
21+
</PropertyGroup>
22+
<PropertyGroup Condition="'$(TargetFramework)'=='net47'">
23+
<DefineConstants>NFX;NET47;$(AdditionalConstants)</DefineConstants>
24+
</PropertyGroup>
25+
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
26+
<DefineConstants>CFX;NETSTANDARD2_0;$(AdditionalConstants)</DefineConstants>
27+
</PropertyGroup>
28+
<ItemGroup Condition="'$(TargetFramework)' == 'net35'">
3429
<Reference Include="System" />
3530
<Reference Include="System.Core" />
3631
</ItemGroup>
37-
<ItemGroup>
38-
<Compile Include="..\GodSharp.Shared\Encryption\Asymmetric\RSA.cs">
39-
<Link>Asymmetric\RSA.cs</Link>
40-
</Compile>
41-
<Compile Include="..\GodSharp.Shared\Encryption\Base64.cs">
42-
<Link>Base64.cs</Link>
43-
</Compile>
44-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMAC.cs">
45-
<Link>Hash\HMAC\HMAC.cs</Link>
46-
</Compile>
47-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACMD5.cs">
48-
<Link>Hash\HMAC\HMACMD5.cs</Link>
49-
</Compile>
50-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACRIPEMD160.cs">
51-
<Link>Hash\HMAC\HMACRIPEMD160.cs</Link>
52-
</Compile>
53-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA1.cs">
54-
<Link>Hash\HMAC\HMACSHA1.cs</Link>
55-
</Compile>
56-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA256.cs">
57-
<Link>Hash\HMAC\HMACSHA256.cs</Link>
58-
</Compile>
59-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA384.cs">
60-
<Link>Hash\HMAC\HMACSHA384.cs</Link>
61-
</Compile>
62-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\HMAC\HMACSHA512.cs">
63-
<Link>Hash\HMAC\HMACSHA512.cs</Link>
64-
</Compile>
65-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\MD5.cs">
66-
<Link>Hash\MD5.cs</Link>
67-
</Compile>
68-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA.cs">
69-
<Link>Hash\SHA\SHA.cs</Link>
70-
</Compile>
71-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA1.cs">
72-
<Link>Hash\SHA\SHA1.cs</Link>
73-
</Compile>
74-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA256.cs">
75-
<Link>Hash\SHA\SHA256.cs</Link>
76-
</Compile>
77-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA384.cs">
78-
<Link>Hash\SHA\SHA384.cs</Link>
79-
</Compile>
80-
<Compile Include="..\GodSharp.Shared\Encryption\Hash\SHA\SHA512.cs">
81-
<Link>Hash\SHA\SHA512.cs</Link>
82-
</Compile>
83-
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\AES.cs">
84-
<Link>Symmetric\AES.cs</Link>
85-
</Compile>
86-
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\DES.cs">
87-
<Link>Symmetric\DES.cs</Link>
88-
</Compile>
89-
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\TripleDES.cs">
90-
<Link>Symmetric\TripleDES.cs</Link>
91-
</Compile>
92-
<Compile Include="..\GodSharp.Shared\Encryption\Symmetric\XES.cs">
93-
<Link>Symmetric\XES.cs</Link>
94-
</Compile>
95-
<Compile Include="..\GodSharp.Shared\Encryption\Util\Util.cs">
96-
<Link>Util\Util.cs</Link>
97-
</Compile>
98-
<Compile Include="Properties\AssemblyInfo.cs" />
32+
<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
33+
<Reference Include="Microsoft.CSharp" />
34+
<Reference Include="System" />
35+
<Reference Include="System.Core" />
36+
</ItemGroup>
37+
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
38+
<Reference Include="Microsoft.CSharp" />
39+
<Reference Include="System" />
40+
<Reference Include="System.Core" />
41+
</ItemGroup>
42+
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
43+
<Reference Include="Microsoft.CSharp" />
44+
<Reference Include="System" />
45+
<Reference Include="System.Core" />
46+
</ItemGroup>
47+
<ItemGroup Condition="'$(TargetFramework)' == 'net47'">
48+
<Reference Include="Microsoft.CSharp" />
49+
<Reference Include="System" />
50+
<Reference Include="System.Core" />
9951
</ItemGroup>
100-
<ItemGroup />
101-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
10252
</Project>

src/GodSharp.Encryption/GodSharp.Encryption.nuspec

Lines changed: 0 additions & 18 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)