Skip to main content

Mojo function

hash

hash[T: Hashable](hashable: T) -> UInt

Hash a Hashable type using its underlying hash implementation.

Parameters:

  • T (Hashable): Any Hashable type.

Args:

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

Returns:

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

hash(bytes: UnsafePointer[SIMD[uint8, 1], alignment=alignment, mut=False, origin=origin], n: Int) -> UInt

Was this page helpful?