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 8217071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:20:56+00:00 2026-06-07T12:20:56+00:00

I want to generate crc code of a string in my c++ code using

  • 0

I want to generate crc code of a string in my c++ code using boost::crc_32_type then later regenerate it in java using (java.util.zip.CRC32) but the result is not the same. Anyone can help?

  • 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-06-07T12:20:58+00:00Added an answer on June 7, 2026 at 12:20 pm

    So. Results are equal.

    import java.util.*;
    import java.lang.*;
    
    class Main
    {
            public static void main (String[] args) throws java.lang.Exception
            {
                    String s = new String("123456789");
                    java.util.zip.CRC32 crc32 = new java.util.zip.CRC32();
                    crc32.update(s.getBytes());
                    System.out.println(crc32.getValue());
            }
    }
    

    3421780262

    http://ideone.com/Q1GTB

    #include <boost/crc.hpp>
    #include <string>
    #include <iostream>
    #include <algorithm>
    
    int main()
    {
       const std::string str = "123456789";
       boost::crc_32_type crc32;
       crc32 = std::for_each(str.begin(), str.end(), crc32);
       std::cout << crc32() << std::endl;
    }
    

    3421780262

    http://liveworkspace.org/code/0a5c4f1eaa920bd0161f7d37fa809aa3

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to generate strong types based on weakly typed data sources, using the
I want to generate facelets code from UIComponent, Eg: org.primefaces.component.commandbutton.CommandButton; CommandButton btn=new CommandButton(); btn.setValue(Click);
I want to generate a report each day and then export that to a
I want generate a list of numbers from 0000 to 9999. I would then
I want to generate bytes sequence containing string length and string content. For example,
I want to generate checkbox field using GridView and system will calculate how many
I want to generate MD5 Fingerprint for using GoogleMap in Android. But I am
I want to generate the random numbers using this loop. When i runs the
I want to generate a QR Code in a Job or Winforms app. My
I want to generate some html code for the jsf page I have (I

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.