Archives

The List

« MD5() :: MySQL Function of the Day | Main | MySQL Function of the Day: Week Six »

CRC32 :: MySQL Function of the Day

By Carsten | April 18, 2008

Function name: CRC32
Aliases: -
Function type: Numerical function
Purpose: Return a Cyclic Redundancy Check value of a string

Description: CRC32() computes a “cyclic redundancy check” value of the input string. It may be used in many of the same places as MD5() (which we discussed yesterday). Historically, CRC has been used to detect noise in transmission signals, whereas MD5 is used more in the area of encryption and authentication of large-size data. Both may be used for hashing, and while not as strong, CRC32 has a couple of advantages over MD5:

Of course there are disadvantages, too:

If hash values are all you want, then you should definitely prefer CRC32 over MD5.

MySQL manual entry on CRC32()


MySQL Function of the Day is a small series of concise information regarding most of the functions and operators available in MySQL. Inspired by PHPs funcaday, it’s meant to provide a daily dose of something in-between “Aha!” and “Ho-hum, I knew that already”, depending on your level of experience with MySQL. You can access the entire series with your browser here or pick up the RSS feed here.

Topics: MySQL Function of the day |

Comments