> ## 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.

# base64_encode

> يشفر بايتات Lua string باستخدام Base64 encoder، مع = padding وبدون فواصل اسطر.

<div className="real-function-page">
  ```lua theme={null}
  base64_encode(data: string): string
  ```

  ## أسماء بديلة

  * `base64encode`
  * `base64.encode`
  * `crypt.base64.encode`
  * `crypt.base64_encode`
  * `crypt.base64encode`

  ## الوسائط

  <ParamField path={"data"} type={"string"} required>
    بايتات Lua string التي تمرر إلى Base64 encoder.
  </ParamField>

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

  <ResponseField name={"encoded"} type={"string"}>
    ناتج Base64 المعاد كسلسلة Lua.
  </ResponseField>

  ## مثال

  شفر Lua string واطبع ناتج Base64.

  ```lua theme={null}
  local encoded = base64_encode("hello world")

  print(encoded)
  print(base64encode("hello world"))
  print(base64.encode("hello world"))
  ```
</div>
