# Function: spaceKeyFromRaw()

```ts
function spaceKeyFromRaw(raw, createdAt?): Promise<SpaceKey>;
```

Defined in: [packages/core/src/privacy/space-encryption.ts:58](https://github.com/leifriksheim/minca/blob/main/core/src/privacy/space-encryption.ts#L58)

A space key from its raw bytes. Its id is derived from them, so a key
handed over (in an invite, a box) can be checked against the id a space or
its history names.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `raw` | `Uint8Array` |
| `createdAt?` | `string` |

## Returns

`Promise`\<[`SpaceKey`](https://minca.dev/api/core/interfaces/SpaceKey.md)\>
