This Java application demonstrates a simple implementation of a messaging system with encryption and decryption functionalities, using a Swing graphical user interface (GUI). The application is divided into two main parts: Receiver
and Sender
, each represented as separate classes in the package Application
. Additionally, it utilizes a custom UI component VerticalFlowLayout
from the UIs
package for layout management.
-
Receiver: Handles the display and decryption of received messages and files.
- Displays decrypted data, key, and plaintext in text areas.
- Uses a
BufferedReader
to read decrypted data from a file.
-
Sender: Manages sending messages and files with encryption.
- Provides a GUI with two tabs: one for sending messages and another for sending files.
- Implements file selection and encryption/decryption through
JFileChooser
and custom encryption logic.
-
Key_generator_UI: A utility class for generating and displaying encryption keys (not fully detailed in the provided code).
-
Key_generator: A utility class for encryption key management (assumed based on context).
-
Locker: A class used for file encryption and decryption (assumed based on context).
- The
Receiver
andSender
classes each create aJFrame
with various components likeJLabel
,TextArea
, andJButton
. VerticalFlowLayout
is used to arrange components vertically.- In
Sender
, aJTabbedPane
is used to separate the message sending and file sending functionalities.
- The application seems to involve a process of encrypting and decrypting messages and files, although the specifics of the encryption algorithm are not detailed in the provided code.
Key_generator
is assumed to play a crucial role in managing encryption keys.
- Prerequisites: Ensure Java is installed on your system.
- Compilation: Compile the Java files in the
Application
andUIs
packages. - Running the Application: Run the
Sender
class to start the application. It will also instantiate theReceiver
part of the application.