CRC cyclic redundancy Check algorithm

Source: Internet
Author: User
Tags crc32

The CRC cyclic redundancy check algorithm is a hash function that can generate a fixed number of bits based on data to verify the errors that occur after data transfer/save, or to verify the integrity of the data, such as compressed files.

The resulting hash value is computed and appended to the data before it is transmitted or stored.The general cyclic redundancy check value is a 32-bit binary number, which is a 8-bit 16 binary string. General Redundancy Check is a value CRC-32 
   CRC-32 implementation: Using the CRC32 class public static void main (string[] args) throws exception{ CRC32 CRC32 = new CRC32 ();crc32.update ("China". GetBytes ("GBK")); long result = Crc32.getvalue ();System. out. println (Long. tohexstring(Result));}
Similarly, using the CRC to process the input-output stream is, use Checkedinputstream and Checkedoutputstream. Working principle with Digestinputstream and digestoutputstream in MD5



From for notes (Wiz)



CRC cyclic redundancy Check algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.