Function hashStrToField

  • Hashes a string to a field element via Poseidon hashing. This function is useful for converting a string into a fixed-size hash that can be used in cryptographic applications.

    Parameters

    • str: string

      The string to be hashed.

    • maxSizeBytes: number

      The maximum size in bytes for the resulting hash.

    Returns bigint

    bigint - The result of the hash.