fix check for keyed and collision-proof checksum