Skip to main content

Mojo function

hash

hash[T: Hashable, HasherType: Hasher = AHasher[0]](hashable: T) -> SIMD[uint64, 1]

Hash a Hashable type using its underlying hash implementation.

Parameters:

  • T (Hashable): Any Hashable type.
  • HasherType (Hasher): Type of the hasher which should be used for hashing.

Args:

  • hashable (T): The input data to hash.

Returns:

A 64-bit integer hash based on the underlying implementation.

hash[HasherType: Hasher = AHasher[0]](bytes: UnsafePointer[SIMD[uint8, 1], alignment=alignment, mut=False, origin=origin], n: Int) -> SIMD[uint64, 1]

Was this page helpful?