This is a modified version of the CRC algorithms by Lammert Bies. It supports more algorithms and has been ported to several languages.
It's also useful for learning how to do hexadecimal calculations and bitwise operations in various programming languages.
Disclaimer:
These test programs demonstrate the calculation of CRC.
I made these translation with a basic knowledge of each language. They may or may not be appropriately formatted / secured / robustified / idiot proofed or any similar programming issues.