Using MySQL, for the Staff (User) table, I am using the triggers (Before Insert and Before Update) to encrypt the passwords that are saved.
Is there anything wrong with this approach?
Is there anything wrong with this approach?
There might be other reasons , but what would be the most important one to consider, triggers can be bypassed.
Meaning, if you have SUPER privileges you can disable triggers and insert passwords without encryption.
My suggestion, encrypt the passwords in the application layer