Text: DES Algorithms
Open Netbeans (or any convenient IDE) and develop the following Java graphical user interface. Then, perform the given tasks in 1 and 2:
1. In the "Encrypt" button, write the code required for encrypting a text message using the DES algorithm. Consider the following instructions/hints:
1.1. Import appropriate libraries.
1.2. Initiate a cipher object and do necessary settings for encryption mode in the DES algorithm.
1.3. Read the plaintext from the "textArea" as a byte array.
1.4. Call the method responsible for encryption.
1.5. Show the encrypted message in the ciphertext "textArea".
2. In the "Decrypt" button, write the code required to decrypt a text message in the DES algorithm. Consider the following instructions:
2.1. Store the ciphertext as a byte array.
2.2. Do necessary settings to prepare the cipher object for decryption mode.
2.3. Call the method that decrypts the ciphertext using the private key.
2.4. Display the plaintext in the corresponding "TextArea".