# fillBytes

`import { fillBytes } from "destack:random";`

Fill a buffer with host-provided random bytes.

```ds title="fillBytes"
export function fillBytes(buffer: &'a [uint8]): Result<void, HostError>
```

[language/library/src/random/random.ds:62:64](https://github.com/destack-sh/destack/blob/main/language/library/src/random/random.ds#L62-L64)
