@aptos-labs/ts-sdk - v3.1.1
    Preparing search index...

    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.