How do you use CBC and HMAC?
I couldn't find enough information on the internet.
How do you get the IV? How would you know what it is when you need to decrypt later? (Wouldn't putting it in the database defeat the purpose?)
What is HMAC, and is it protected from hacking?
The encrypted text stays in the database. If someone hacks into the database, they would probably have access to the file manager too, unless they found a way to do SQL injection. How would the script know which IV and key to use, that the hacker wouldn't know?
What is the best method to use when encrypting multiple paragraphs of text, which will only be seen within the website by the user who wrote it? (The user always views it as plain text.)
I use ECB now (the website has not yet been released for beta) but I've heard that CBC is much more secure.