docs: def hash_bytes(value, hasher=hashlib.sha256):
      # type: (bytes, Callable) -> str
      """
      Generate a hash for a bytes value.
  
      The hash will be generated by generating a hash with HMAC using the
      session secret as the key and the given hash function.
  
      :param value: Bytes value to hash
      :param hasher: Hash function to use.
      :return: Hexadecimal presentation of the hash as a string
      """
      return hmac.new(get_secret(), value, hasher).hexdigest()