[digest] Add generic CRC32 function