Commit 402af014 authored by daniel.parker's avatar daniel.parker

initial.

parent a7175211
Pipeline #385 failed with stages
public class AssessmentPartThree {
// The simplest form of encryption is the rotation cipher (also known as Caeser's Cipher)
// An offset value is chosen to encrypt a message. Each letter is replaced by the
// The simplest form of encryption is the rotation cipher (also known as
// Caeser's Cipher)
// An offset value is chosen to encrypt a message. Each letter is replaced by
// the
// letter that that number of places away from it.
// So if an offset value of 1 is chosen, each letter is replaced by the one after it
// So if an offset value of 1 is chosen, each letter is replaced by the one
// after it
// - so a becomes b, b becomes c, etc
// If a value of -2 is chosen a becomes y, b becomes z and so on
// If a value of -2 is chosen a becomes y, b becomes z and so on......
public char enryptedCharacter(char theChar, int theOffset) {
char returnChar = theChar;
......@@ -48,9 +51,8 @@ public class AssessmentPartThree {
for (int i = 0; i < theMessage.length(); i++) {
char character = theMessage.charAt(i);
codedString+=enryptedCharacter(character,theOffset);
codedString += enryptedCharacter(character, theOffset);
//codedString = String.valueOf(theMessageChars);
}
return codedString;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment