PHP-040 / Advanced
Incorrect cipher modes such as fixed IV or ECB
Why is this a problem?
Identical plaintext becomes identical ciphertext, or IV reuse destroys confidentiality.
How to fix it
php
// Use Laravel Crypt (AES-256-CBC + HMAC)
$enc = Crypt::encryptString($data);
// For direct use: AES-256-GCM, generate an IV with random_bytes each time