Almost all the application regardless of their nature and purpose are using encryption to secure sensitive data to be saved to database, if the user using a method to encrypt a file (for instance an image) and save the binary data to database and later decrypt it to display it to end user, what are the best practice to save encryption and decryption methods in application?
I know that I have to use different salt or password for each file to be encrypted however when it comes to storing and reusing encryption and decryption methods, it becomes a security thread if somebody get access to file containing methods...
I am also very well-aware that writing a custom encryption method probably is not a wise solution since it needs knowledge and experience information security so in this case is there any suggestion to mitigate the risk of accessing these methods by unauthorized people??