-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sample program. Fixed namespace and assembly names.
- Loading branch information
1 parent
271690a
commit bdac38c
Showing
7 changed files
with
111 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,68 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26124.0 | ||
MinimumVisualStudioVersion = 15.0.26124.0 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "library", "library\library.csproj", "{237C5C62-71BC-4857-A6CE-E41169B42AF4}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests\tests.csproj", "{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x64.Build.0 = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x86.Build.0 = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x64.ActiveCfg = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x64.Build.0 = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x86.ActiveCfg = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x86.Build.0 = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x64.Build.0 = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x86.Build.0 = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x64.ActiveCfg = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x64.Build.0 = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x86.ActiveCfg = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26124.0 | ||
MinimumVisualStudioVersion = 15.0.26124.0 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "library", "library\library.csproj", "{237C5C62-71BC-4857-A6CE-E41169B42AF4}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests\tests.csproj", "{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Other", "Other", "{94AEE161-10DB-4514-B43C-F8B73BBE2252}" | ||
ProjectSection(SolutionItems) = preProject | ||
README.md = README.md | ||
Reference\crc_v3.txt = Reference\crc_v3.txt | ||
EndProjectSection | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "Sample\Sample.csproj", "{A272605E-01A9-4E73-BDF0-75FF8B208ECB}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x64.Build.0 = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Debug|x86.Build.0 = Debug|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x64.ActiveCfg = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x64.Build.0 = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x86.ActiveCfg = Release|Any CPU | ||
{237C5C62-71BC-4857-A6CE-E41169B42AF4}.Release|x86.Build.0 = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x64.Build.0 = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Debug|x86.Build.0 = Debug|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x64.ActiveCfg = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x64.Build.0 = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x86.ActiveCfg = Release|Any CPU | ||
{7D2DA1FF-984C-48D5-AAF2-BCD2BBDA9954}.Release|x86.Build.0 = Release|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Debug|x64.Build.0 = Debug|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Debug|x86.Build.0 = Debug|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Release|x64.ActiveCfg = Release|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Release|x64.Build.0 = Release|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Release|x86.ActiveCfg = Release|Any CPU | ||
{A272605E-01A9-4E73-BDF0-75FF8B208ECB}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Text; | ||
using InvertedTomato.IO; | ||
|
||
namespace Sample | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
// Create a new instance of Crc using the algorithm of your choice | ||
var crc = CrcAlgorithm.CreateCrc16CcittFalse(); | ||
|
||
// Give it some bytes to chew on - you can call this multiple times if needed | ||
crc.Append(Encoding.ASCII.GetBytes("Hurray for cake!")); | ||
|
||
// Get the output - as a hex string, byte array or unsigned integer | ||
Console.WriteLine(crc.ToHexString()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Library\Library.csproj" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<AssemblyName>InvertedTomato.Crc.Sample</AssemblyName> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters