code: def generate(data, algorithms=(DEFAULT_ALOGRITHM,)):
      
      return (Hash.fromresource(data, algorithm) for algorithm in algorithms)
docs: Yields subresource integrity Hash objects for the given data &
      algorithms
  
      >>> for ihash in generate(b"alert('Hello, world.');"):
      ...     print ('%s %s' % (ihash.algorithm, ihash.b58digest))
      sha384 H8BRh8j48O9oYatfu5AZzq6A9RINhZO5H16dQZngK7T62em8MUt1FLm52t+eX6xO
  
      >>> list(generate(b"alert('Hello, world.');", ['sha256', 'sha384']))
      ... # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
      [subresource_integrity.Hash('sha256', 'qz.../Tng=', ''),
       subresource_integrity.Hash('sha384', 'H8BR...+eX6xO', '')]