# Engine.set

Installs crypto implementations, replacing the `@noble/*` implementations ox uses by default.

Slots and their functions are optional. Omissions preserve earlier overrides, or use Ox's default when none exists. Calls merge, so a later engine can override one primitive.

Call this once, during application startup, before any crypto call. ox resolves the engine at call time, so values computed beforehand used whatever implementation was installed then.

## Imports

:::code-group
```ts [Named]
import { Engine } from 'ox/node'
```

```ts [Entrypoint]
import * as Engine from 'ox/node/Engine'
```
:::

## Examples

```ts twoslash
import { Engine, Hash } from 'ox'

Engine.set({
  Hash: { keccak256: () => new Uint8Array(32) }
})

Hash.keccak256('0xdeadbeef')
// @log: '0x0000000000000000000000000000000000000000000000000000000000000000'
```

## Definition

```ts
function set(
  value: engine.Engine,
): void
```

**Source:** [src/core/Engine.ts](https://github.com/wevm/ox/blob/main/src/core/Engine.ts#L108)

## Parameters

### value

* **Type:** `engine.Engine`

Engine to install.

#### value.Bls

* **Type:** `Bls`
* **Optional**

Implementation for [`Bls`](/api/Bls).

#### value.Ed25519

* **Type:** `Eddsa`
* **Optional**

Implementation for [`Ed25519`](/api/Ed25519).

#### value.Hash

* **Type:** `Hash`
* **Optional**

Implementation for [`Hash`](/api/Hash).

#### value.Keystore

* **Type:** `Keystore`
* **Optional**

Implementation for [`Keystore`](/api/Keystore).

#### value.Mnemonic

* **Type:** `Mnemonic`
* **Optional**

Implementation for [`Mnemonic`](/api/Mnemonic).

#### value.P256

* **Type:** `Ecdsa`
* **Optional**

Implementation for [`P256`](/api/P256).

#### value.Secp256k1

* **Type:** `Ecdsa`
* **Optional**

Implementation for [`Secp256k1`](/api/Secp256k1).

#### value.X25519

* **Type:** `Ecdh`
* **Optional**

Implementation for [`X25519`](/api/X25519).

## Return Type

`void`
