> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# encryptKeystoreJsonSync

```ts theme={null}
function encryptKeystoreJsonSync(
   account, 
   password, 
   options?): string
```

Return the JSON Keystore Wallet for `account` encrypted with `password`.

The `options` can be used to tune the password-based key derivation function parameters, explicitly set the random
values used. Any provided [**ProgressCallback**](/sdk/content/type-aliases/ProgressCallback) is ignored.

## Parameters

| Parameter  | Type                                                           | Description                                       |
| :--------- | :------------------------------------------------------------- | :------------------------------------------------ |
| `account`  | [`KeystoreAccount`](/sdk/content/type-aliases/KeystoreAccount) | The account to encrypt.                           |
| `password` | `string` \| `Uint8Array`                                       | The password to encrypt the JSON data.            |
| `options`? | [`EncryptOptions`](/sdk/content/type-aliases/EncryptOptions)   | The options to use when encrypting the JSON data. |

## Returns

`string`

The encrypted JSON data.

## Source

[wallet/json-keystore.ts:463](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/wallet/json-keystore.ts#L463)
