I admit that, reading the code, I found it challenging to find a severe crypto bug simply because everything is wrong. Even their way of packing the data into a base64 is nonsense. The parser is nonsense. Almost every line of code is wrong. Without more context, I’m not quite convinced that the key is reliably anything other than a constant due to the use of PHP and the failure to validate that the variables in question are initialized.
It’s like the most severe bugs are buried in code that is 100% bug!
edit: the key is a constant. I’m speechless. See https://paul.reviews/cyberalarm-an-independent-security-revi...