PHP sending encrypted data via the URL

后端 未结 4 1125
余生分开走
余生分开走 2021-01-04 18:35

I\'m trying to send encrypted data over the url to another site (using file_get_contents(\"anotherUrl.php?hash=$encryptedString\"). The problem is, sometimes, t

4条回答
  •  孤城傲影
    2021-01-04 18:47

    Instead of using Base64 for encoding your data you can also use Base32 (RFC 4648) which is URL-safe because it only uses letters A–Z (case-insensitive) and the digits 2–7. There is already a PHP library for encoding/decoding. Note that Base32 takes ~20% more space than Base64.

    You can also use URLcrypt which is a handy library helping you with encryption and Base32 encoding.

提交回复
热议问题