This Laravel web application allows users to encrypt and decrypt files using OpenSSL. The application provides the following features:
- Select any file from the user's computer.
- Display file details (name, size, extension).
- Encrypt files using AES-256-CBC.
- Decrypt files to retrieve the original content.
- Save the encrypted/decrypted file with a user-defined name and location.
-
File Selection and Details Display:
- Users can select any file from their computer.
- The application displays file details including name, size, and extension.
-
Encryption Process:
- Users can encrypt the selected file using the AES-256-CBC algorithm.
- Users can specify the output file name and location for the encrypted file.
-
Decryption Process:
- Users can decrypt an encrypted file to retrieve the original content.
- Users can specify the output file name and location for the decrypted file.
-
Save File Feature:
- Allows users to select the name and location for saving the encrypted/decrypted file.
FileModel: Represents the file entity with attributes like path, name, size, and extension.
FileRepository: Implements file operations such as storing, retrieving, and deleting files.
EncryptFileUseCase: Encrypts the file content.DecryptFileUseCase: Decrypts the file content.UploadFileUseCase: Handles file uploads.ValidateEncryptionUseCase: Validates the encryption by comparing original and decrypted files.FileUseCases: Acts as a factory to get instances of use cases.
FileController: Handles HTTP requests related to file operations and invokes the appropriate use cases.
ErrorHelper: Logs errors with different levels.ErrorLevels: Enum representing different error levels.
- Reusable Components:
- Use cases are designed as singletons for easy reuse.
- Repository pattern decouples data access logic.
- Design Patterns: Used SOLID principles to ensure modularity and reusability.
- Clean Code: Adhered to PSR standards.