Computers & Internet Logo

Related Topics:

Posted on Jun 02, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Write code for that program

Plz help me solve this problem.. Qsn: One of the most basic forms of encryption is known as a Ceaser Shift cipher. This type of encryption takes a language and uses and offset of the language to substitutes a different letter for every letter. This offset works in the following way: if an offset of 1 is used, then ?a? is represented by ?b?, ?b? is represented by ?c?, and so on. When we reach the end of the alphabet and a no letter is after the current one, then we wrap around to the beginning of the language. In our current scenario ?z? is represented by ?a?. So, a Ceaser-shift of 11 would be: Original: a b c d e f g h i j k l m n o p q r s t u v w x y z | | | | | | | | | | | | | | | | | | | | | | | | | | Code: l m n o p q r s t u v w x y z a b c d e f g h i j k Note, your encryption schemes should be case insensitive, so both ?A? and ?a? should be encrypted by the same letter. The methods that you write for encryption should be put in a file named Encrypter.java. [a] Write a method called ceaserEncrypt() that accepts one parameter: the name of the file to be encrypted. This method should Ceaser shift the 26 letters of the English alphabet and output an encrypted version of the input file. The offset should be random, so that the shift will not be the same every time the program is run. Given the name of a text file, your program should input the file file1.txt and produce a Ceaser shift encrypted file ceaserFile1.txt (where ?file1? is the name of the file given to the program). Your program should also output a second file file1KeyC.txt that specifies the offset used for encoding. [b] Write a method called ceaserDecrypt() that accepts two parameters: the name of the file to be decrypted and the name of the file with the key. This method should produce a file containing the contents of the original file decrypted, and stored as decryptFileC.txt.

1 Answer

Rob Hill

Level 3:

An expert who has achieved level 3 by getting 1000 points

Superstar:

An expert that got 20 achievements.

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

  • Master 1,483 Answers
  • Posted on Jun 16, 2009
Rob Hill
Master
Level 3:

An expert who has achieved level 3 by getting 1000 points

Superstar:

An expert that got 20 achievements.

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Joined: Jun 13, 2009
Answers
1483
Questions
0
Helped
531899
Points
3843

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

536 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

ADMIN Andrew
ADMIN Andrew

Level 3 Expert

73785 Answers

ADMIN Eric
ADMIN Eric

Level 3 Expert

42226 Answers

Brad Brown

Level 3 Expert

19190 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...