Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    This is better and much safer version. Thanks, it works as expected too. Commented Jul 30, 2019 at 7:59
  • 4
    how do you create and where do you keep the encryption key? Commented Apr 12, 2020 at 8:52
  • 1
    OK! I understood, I've changed openssl_random_pseudo_bytes function to static 16 char string.. Thank You!!! Commented Jul 8, 2020 at 14:34
  • 1
    I used this in my project with some changes in order to use it statically. Thank you!!!! Commented Dec 24, 2020 at 16:55
  • 1
    $cipher = 'AES-256-CTR'; is better Commented Dec 11, 2022 at 21:10