When is CRC more appropriate to use than MD5/SHA1?

后端 未结 13 1499
走了就别回头了
走了就别回头了 2020-11-28 01:46

When is it appropriate to use CRC for error detection versus more modern hashing functions such as MD5 or SHA1? Is the former easier to implement on embedded hardware?

13条回答
  •  眼角桃花
    2020-11-28 02:15

    CRC32 is faster and the hash is only 32bits long.

    Use it when you just want a quick and light checksum. CRC is used in ethernet.

    If you need more reliability it's preferable to use a modern hashing function.

提交回复
热议问题