data integrity checks for uploads/downloads

For uploads/downloads, check in order of priority:

  • md5 computed for local file against md5 contained in Object’s metadata (more expensive, more reliable)
  • crc32c computed for local file against crc32c contained in Object’s metadata (less expensive, less reliable)

eaxmple gslib code for the checks chain

For copies of objects already in the storage, compare the checksums in the Object’s metadata with the same priority (md5 could not be available in some cases)
example gslib_code

If the checksum check fails, the created file should be deleted by the client, and an exception raised.
example gslib_code

We should allow to override the configuration for the checks (e.g. use only crc32c, do not perform checks), but it should be strongly discouraged.