Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that allows users to encrypt files. We will implement two simple encryption methods. Have the following GUI components: Have a button that

image text in transcribed
Write a program that allows users to encrypt files. We will implement two simple encryption methods. Have the following GUI components: Have a button that when pressed opens a FileChooser. Have the user choose the file with the FileChooser. Encrypt the contents of the file and put the results in a Text Area. First Encryption Technique The first file encryption technique we will use for this program is the highly secure "one letter off" system. So an "a" will be represented by a "b", and a "b" will be represented by a "c" in the encrypted file and so on. Encrypt only the letters in the file. If you come to a non-letter character (spaces, punctuation, numbers, etc.), just print them as is without encrypting. For example, to get the first char from a String named "stringExample" char firstChar = stringExample.charAt(0); Second Encryption Technique The second file encryption technique is to replace each letter with the place it is in the alphabet. We will use two digits for every letter For example, the letter 'a' is 01, the letter 'b' is 02, the letter 'c' is 03, the letter 'z' is 26 So that we can use capital letters we start 'A' with 27. 'B' with 28, 'C' with 29, and so on. For numbers, we convert each digit into two letters: the first two letters that they stand for. The first letter is capitalized followed by a lower-case letter. For example, 8 written out is eight. So, 8 would be encrypted to "Ei", I would be encrypted to "On", 2 would be encrypted to "Tw", 3 would be "Th" and so on Note that "10" is actually two digits, so it would be encrypted as "1" and "0" "OnZe". If you come to a non-letter character (spaces, punctuation, numbers, etc.), just print them as is without encrypting. Write a program that allows users to encrypt files. We will implement two simple encryption methods. Have the following GUI components: Have a button that when pressed opens a FileChooser. Have the user choose the file with the FileChooser. Encrypt the contents of the file and put the results in a Text Area. First Encryption Technique The first file encryption technique we will use for this program is the highly secure "one letter off" system. So an "a" will be represented by a "b", and a "b" will be represented by a "c" in the encrypted file and so on. Encrypt only the letters in the file. If you come to a non-letter character (spaces, punctuation, numbers, etc.), just print them as is without encrypting. For example, to get the first char from a String named "stringExample" char firstChar = stringExample.charAt(0); Second Encryption Technique The second file encryption technique is to replace each letter with the place it is in the alphabet. We will use two digits for every letter For example, the letter 'a' is 01, the letter 'b' is 02, the letter 'c' is 03, the letter 'z' is 26 So that we can use capital letters we start 'A' with 27. 'B' with 28, 'C' with 29, and so on. For numbers, we convert each digit into two letters: the first two letters that they stand for. The first letter is capitalized followed by a lower-case letter. For example, 8 written out is eight. So, 8 would be encrypted to "Ei", I would be encrypted to "On", 2 would be encrypted to "Tw", 3 would be "Th" and so on Note that "10" is actually two digits, so it would be encrypted as "1" and "0" "OnZe". If you come to a non-letter character (spaces, punctuation, numbers, etc.), just print them as is without encrypting

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions