# stringToIndex | @aa-sdk/core

> Overview of the stringToIndex function from @aa-sdk/core

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function stringToIndex(phrase): bigint;
```

Defined in: [aa-sdk/core/src/utils/bigint.ts:117](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/utils/bigint.ts#L117)

Useful if you want to use a string, such as a user's email address, as salt to generate a unique SmartAccount per user.

example:

```
const salt = stringToIndex("alice@example.com");

export const account = new SimpleSmartContractAccount({
  index: salt,
  // other args omitted...
});
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `phrase`
      </td>

      <td>
        `string`
      </td>

      <td>
        any string value.
      </td>
    </tr>

  </tbody>
</table>

## Returns

`bigint`

the bigint value of the hashed string