> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# AesGcm.fromPrf

:::info
`AesGcm.fromPrf` is a re-export of ox's [`AesGcm.fromPrf`](https://oxlib.sh/api/AesGcm/fromPrf). Refer to the ox documentation for the full reference.
:::

Derives an AES-256-GCM key from a 32-byte WebAuthn PRF output.

The permanent derivation contract uses the PRF output as the HMAC-SHA256 key. Its message is the UTF-8 bytes of `ox.aesGcm.fromPrf.v1` followed by a 32-bit big-endian counter set to zero.

## Imports

```ts
import { AesGcm } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { AesGcm } from 'viem/utils'

const key = await AesGcm.fromPrf(
  '0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f'
)
```

## Definition

```ts
function fromPrf(
  value: Hex.Hex | Bytes.Bytes,
): Promise<CryptoKey>
```

## Parameters

### value

* **Type:** `Hex.Hex | Bytes.Bytes`

A 32-byte WebAuthn PRF output.

## Return Type

A nonextractable AES-256-GCM key for encryption and decryption.

`Promise<CryptoKey>`
