# Function: getDeviceKey()

```ts
function getDeviceKey(id, dbName?): Promise<CryptoKey | null>;
```

Defined in: [packages/core/src/identity/device-key.ts:40](https://github.com/leifriksheim/minca/blob/main/core/src/identity/device-key.ts#L40)

Finds a device key by id. Absent is a normal answer: the wrap was made in
another browser, or storage has been cleared since.

## Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `id` | `string` | `undefined` |
| `dbName?` | `string` | `DB_NAME` |

## Returns

`Promise`\<`CryptoKey` \| `null`\>
