import hashlib


def img_bin_to_sha256(img_bin):
  """Hash image binary data to sha1.

  Args:
    img_bin: binary string of image.
  Returns:
    sha1 of the image.
  """
  img_sha2 = hashlib.sha256(img_bin).hexdigest()
  return img_sha2