---
agentTools:
  projectIndex: https://unpedash.readme.io/llms.txt
---

# For Php

| Variable   | Description                  |
| :--------- | :--------------------------- |
| $parameter | Body request parameter array |
| $key       | get it from api panel        |
| $iv        | get it from api panel        |

```
public static function encrypt($parameter, $key, $iv)
{
  $data = json_encode($data, JSON_UNESCAPED_SLASHES);
  $ciphertext_raw = openssl_encrypt($data, "AES-256-CBC", $key, OPENSSL_RAW_DATA, $iv);
  return bin2hex($ciphertext_raw);
}

$encyptedBody = $this->encrypt($parameter, $key, $iv);
```

> 📘 For online reference
>
> [Aes Encryption](https://www.devglan.com/online-tools/aes-encryption-decryption)