function · Browser and Node

# pairKeys

k(me→peer) and k(peer→me), from one X25519 agreement.

`@toip-tools/mesh-transport` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mesh-transport/src/keys.ts#L32)

Import:

```ts
import { pairKeys } from "@toip-tools/mesh-transport";
```

## Declaration

Signature:

```ts
pairKeys(me: LocalKeys, peer: PeerKeys): {
    out: Uint8Array;
    in: Uint8Array;
};
```

### Parameters

- **`me` (required)**: `LocalKeys`
- **`peer` (required)**: `PeerKeys`

### Returns

`{ out: Uint8Array; in: Uint8Array; }`

## Returned object

The returned object exposes these properties and methods.

## Properties

- **`out` (required)**: `Uint8Array<ArrayBufferLike>`
- **`in` (required)**: `Uint8Array<ArrayBufferLike>`

[Usage guide](https://toip.tools/toolkit/mesh-transport/#usage) · [Error handling](https://toip.tools/toolkit/mesh-transport/#errors) · [All exports](https://toip.tools/toolkit/mesh-transport/api/)

---

This is the Markdown version of https://toip.tools/toolkit/mesh-transport/api/pairKeys/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
