Add native implementation of crc masking, properly use crc32c as well
Fixes crc calculation and adds corrupt file test