Comments (1)
the CRC of an array of bytes is a number (not a string). this may be confusing to some people not familiar with number systems other than base 10. The hexidecimal (base 16) number 0x3AD00FD2 is 986714066 in decimal (base 10). furthermore 3AD00FD2 and 3ad00fd2 are the same number because numbers unlike letters do not have "capitals or lowercase versions of themselves (technically). With base 16 letters from the alphabet are used to represent values 10 through 16 (a-f/A-F) but whether you use the capital or lowercase A/a is always the value for 10, B/b is always the value for 11 and so on... https://en.wikipedia.org/wiki/Radix
to get the upper / lower case hexidecimal representation of the number in .net you use the standard .net format string for hex (scroll towards the bottom search for "x").
to view this / use this, simply create a console application and use the following code. using the "x" format will return a-f in lower case. "X" will return A-F in uppercase.
var crc = 0x3AD00FD2;
var lowerCased = $"{crc:x8}";
var upperCased = $"{crc:X8}";
Console.WriteLine(lowerCased);
Console.WriteLine(upperCased);
regardless they're the same number. ;)
cheers.
--Steve
from nullfx.crc.
Related Issues (9)
- Wrong poly in the comment HOT 1
- Can you add support for the .NET Framework? HOT 4
- Can you add new CRC16 method calculate for "Massa-K" device in your repo? HOT 2
- Can you add a new Crc16Algorithm for modbus? HOT 2
- NullFX.CRC.Crc16.ComputeChecksum(Crc16Algorithm.CcittKermit, bytes) gving wrong results HOT 3
- Add support for .NET Standard 2.0 HOT 3
- Variations of CRC HOT 3
- CRC within a buffer beyond length of bytes for CRC returns 0.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nullfx.crc.