Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3486790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:04:21+00:00 2026-05-18T11:04:21+00:00

Who knows how this function calculates checksum values? My goal is to rewrite the

  • 0

Who knows how this function calculates checksum values?

My goal is to rewrite the FoxPro application on .NET, preserving the old database, but some values in the DB were calculated with this function.


Question is closed.

I didn’t notice that FOXCHKSUM has been internal function in the project.

—

But, anyway, thanx for aswers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:04:22+00:00Added an answer on May 18, 2026 at 11:04 am

    If is it interested to somebody – I found Foxpro algorithm that calc Crc16 and Crc32 with functions SYS(2107) and SYS(2007). (See answer of @Stuart DunkeId).

    It is not really CRC, but some checksum calculation. Anyway that function return just the same result that foxpro analog.

    Here is it on C#:

        public static uint Crc(byte[] bytes, uint seed = (uint)0, int lcBitLen = 16)
        {
            var laPower = new byte[] { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 };
            var lnBitLen = lcBitLen == 32 ? 0x8005 : 0x1021; // 1021 hex (16bit), 8005 hex (32bit)
            var lnCrc = seed == 0 ? 0xffffffff : seed;       // Reset for Each Text Block
            foreach (var byteVal in bytes)
            {
                for (var inLoop = 7; inLoop >= 0; inLoop--)
                {
                    var testBit = ((lnCrc & 0x8000) == 0x8000 && (byteVal & laPower[inLoop]) != laPower[inLoop])
                                  || ((lnCrc & 0x8000) != 0x8000 && (byteVal & laPower[inLoop]) == laPower[inLoop]);
                    lnCrc = (lnCrc & 0x7fff)*2;
                    if (testBit)
                        lnCrc = (uint)(lnCrc ^ lnBitLen);
                }
            }
            return lnCrc;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyone who knows this? I have been trying this for the last
It may be the case this is only possible through looping, but who knows.
Simple question for the one who knows the answer... $xml = simplexml_load_file(http://url/path/file.xml); This url
Who knows about rgraph and HTML5? ( http://www.rgraph.net ) The code of my chart
thanks in advance to anyone who knows the answer to this as this problem
This must be simple question for someone who knows about spl_autoload routines. I am
I know this may sound like a stupid question, especially to someone who knows
I'm mainly asking this to professionals who know the playing field of professional developing.
This question is for the people who know both Haskell (or any other functional
those of you who read my previous questions may already know this: I'm currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.