I use counter mode with 256 bit key
Key is generated as sha256 hash of the user password
That's also not a secure way of generating an AES key; those crypto keys can be cracked quickly. The problem you're trying to solve is the entire reason for PBKDF2.