parameters: (name, data=b'', **kwargs)
docstring: new(name, data=b'') - Return a new hashing object using the named algorithm;
      optionally initialized with data (which must be a bytes-like object).
docstring_summary: new(name, data=b'') - Return a new hashing object using the named algorithm;
      optionally initialized with data (which must be a bytes-like object).
docstring_tokens: new ( name data = b ) - Return a new hashing object using the named algorithm ; optionally initialized with data ( which must be a bytes - like object ) .
function: def __hash_new(name, data=b'', **kwargs):
      """new(name, data=b'') - Return a new hashing object using the named algorithm;
      optionally initialized with data (which must be a bytes-like object).
      """
      if name in {'blake2b', 'blake2s'}:
          # Prefer our blake2 implementation.
          # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s.
          # It does neither support keyed blake2 nor advanced features like
          # salt, personal, tree hashing or SSE.
          return __get_builtin_constructor(name)(data, **kwargs)
      try:
          return _hashlib.new(name, data)
      except ValueError:
          # If the _hashlib module (OpenSSL) doesn't support the named
          # hash, try using our builtin implementations.
          # This allows for SHA224/256 and SHA384/512 support even though
          # the OpenSSL library prior to 0.9.8 doesn't provide them.
          return __get_builtin_constructor(name)(data)
function_tokens: def __hash_new ( name , data = b'' , * * kwargs ) : if name in { 'blake2b' , 'blake2s' } : # Prefer our blake2 implementation. # OpenSSL 1.1.0 comes with a limited implementation of blake2b/s. # It does neither support keyed blake2 nor advanced features like # salt, personal, tree hashing or SSE. return __get_builtin_constructor ( name ) ( data , * * kwargs ) try : return _hashlib . new ( name , data ) except ValueError : # If the _hashlib module (OpenSSL) doesn't support the named # hash, try using our builtin implementations. # This allows for SHA224/256 and SHA384/512 support even though # the OpenSSL library prior to 0.9.8 doesn't provide them. return __get_builtin_constructor ( name ) ( data )