> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# crypt.random

> ينشئ raw random bytes باستخدام random byte generator ويعيدها كسلسلة Lua.

<div className="real-function-page">
  ```lua theme={null}
  crypt.random(size: number): string
  ```

  ## الوسائط

  <ParamField path={"size"} type={"number"} required>
    رقم يمر عبر integer conversion قبل التخصيص. القيم الاقل من او تساوي 0 تسبب argument error.
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"bytes"} type={"string"}>
    Raw generated bytes تعاد كسلسلة Lua. طول السلسلة المعادة يطابق عدد البايتات المخصصة.
  </ResponseField>

  ## مثال

  انشئ raw bytes واطبع طول Lua string المعادة.

  ```lua theme={null}
  local bytes = crypt.random(16)

  print(bytes)
  print(#bytes)
  ```
</div>
