[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Auth](https://evolu.dev/docs/api-reference/common/local-first/Auth) › createDeviceSecret

```ts
function createDeviceSecret(
  deps: RandomBytesDep,
): Uint8Array<ArrayBufferLike> &
  Brand<"Entropy"> &
  Brand<"Length32"> &
  Brand<"DeviceSecret">;
```

Defined in: [packages/common/src/local-first/Auth.ts:123](https://github.com/evoluhq/evolu/blob/aa223771feea747ffb1b0f5f3271574455633e37/packages/common/src/local-first/Auth.ts#L123)

Creates a cryptographically random [DeviceSecret](https://evolu.dev/docs/api-reference/common/local-first/Auth/variables/DeviceSecret).