CRC/Checksum Code

I m new to this group.
I m developing some message handler for that i need to verify the Messages with some checksum bit.
Can anybody help me out how to encode the messages with some checksum and vice versa.