💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## RSA数据加密 > rsa_encrypt(string $data, string $publicKey): string | 参数 | 类型 | 必须 | 说明 | | --- | --- | --- | --- | | `$data` | string | 是 | 待加密数据 | | `$publicKey` | string | 是 | RSA公钥 | 返回值:string 类型 > 示例: ```php $data = "123456"; $publicKey= "**************************"; $encrypted = rsa_encrypt($data,$publicKey); dump($encrypted); // 输出:FWHx+J7vrgR1DfqPjDZtEudrp9au/SgmqKCjJZERj7bVdjsVMbRwDn8lYFDTIqeiFlDaDoLvSQXjmpp/QkTLGsG5BmxQjgghauXmNnuWlZkbs5AMiyx1jFA4vbRlCT3k6272MtzGqDXP9U3hyd6iFkC2JnIF/GNiBZk1mDZVpcHLtUttEcdTQrYWOBBu1b/8O2AilTDNauWxvb7C4DHyUdxJ9VpVBUBlIQoYQK/N+SMQbvF2GNHofDUFGMujYOTmMOxsIr16dYppAjzAV/n9tYm3QqBvtfsCyZHohjruhfhBTow9KEVLUk6ZLbZgTY2e7QigxkRfnrrHLnzJ/UJBkQ== ```