# Function: createEncryptedAdapter()

```ts
function createEncryptedAdapter(
   inner, 
   key, 
   options?
): StorageAdapter;
```

Defined in: [packages/core/src/storage/encrypted-adapter.ts:44](https://github.com/leifriksheim/minca/blob/main/core/src/storage/encrypted-adapter.ts#L44)

Wraps an adapter so values under the sealed prefixes are encrypted on the
way in and opened on the way out. Each is bound to its storage key, so they
can't be swapped between entries, and one that does not open is refused:
otherwise anyone who can write the folder could plant a space in the clear.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `inner` | [`StorageAdapter`](https://minca.dev/api/core/interfaces/StorageAdapter.md) | - |
| `key` | `CryptoKey` | The account's local key (`deriveLocalKey`) |
| `options?` | [`EncryptedAdapterOptions`](https://minca.dev/api/core/interfaces/EncryptedAdapterOptions.md) | - |

## Returns

[`StorageAdapter`](https://minca.dev/api/core/interfaces/StorageAdapter.md)
