Refactored file encryption in FileCipher class