code: def file_hash(load, fnd):
      '''
      Return an MD5 file hash
      '''
      if 'env' in load:
          # "env" is not supported; Use "saltenv".
          load.pop('env')
  
      ret = {}
  
      if 'saltenv' not in load:
          return ret
  
      if 'path' not in fnd or 'bucket' not in fnd or not fnd['path']:
          return ret
  
      cached_file_path = _get_cached_file_name(
              fnd['bucket'],
              load['saltenv'],
              fnd['path'])
  
      if os.path.isfile(cached_file_path):
          ret['hsum'] = salt.utils.hashutils.get_hash(cached_file_path)
          ret['hash_type'] = 'md5'
  
      return ref file_hash(load, fnd):
      '''
      Return an MD5 file hash
      '''
      if 'env' in load:
          # "env" is not supported; Use "saltenv".
          load.pop('env')
  
      ret = {}
  
      if 'saltenv' not in load:
          return ret
  
      if 'path' not in fnd or 'bucket' not in fnd or not fnd['path']:
          return ret
  
      cached_file_path = _get_cached_file_name(
              fnd['bucket'],
              load['saltenv'],
              fnd['path'])
  
      if os.path.isfile(cached_file_path):
          ret['hsum'] = salt.utils.hashutils.get_hash(cached_file_path)
          ret['hash_type'] = 'md5'
  
      return ret
docs: Return an MD5 file hash