KrYounger преди 6 години
родител
ревизия
01d0252ac1
No account linked to committer's email
променени са 1 файла, в които са добавени 37 реда и са изтрити 0 реда
  1. 37
    0
      README.md

+ 37
- 0
README.md Целия файл

@@ -0,0 +1,37 @@
1
+# SimpleCrypt
2
+a simple set of crypt problems.
3
+
4
+Create a few ciphers. Use String inside of your classes.
5
+
6
+1 ROT13 - take the 26 letters of the alphabet and create a `String <- doRot13(String)` method in the ROT13 class
7
+2 Caesar - make a subclass of ROT13 that implements the famous caesar cipher.
8
+3 Create you own cipher, using a different set of 
9
+
10
+## Explanation
11
+
12
+ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple letter substitution cipher that replaces a letter with the 13th letter after it, in the alphabet. ROT13 is a special case of the Caesar cipher, developed in ancient Rome.
13
+
14
+Because there are 26 letters (2×13) in the basic Latin alphabet, ROT13 is its own inverse; that is, to undo ROT13, the same algorithm is applied, so the same action can be used for encoding and decoding. The algorithm provides virtually no cryptographic security, and is often cited as a canonical example of weak encryption.
15
+
16
+ROT13 is used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13 has been described as the "Usenet equivalent of a magazine printing the answer to a quiz upside down".[2] ROT13 has inspired a variety of letter and word games on-line, and is frequently mentioned in newsgroup conversations.
17
+
18
+Applying ROT13 to a piece of text merely requires examining its alphabetic characters and replacing each one by the letter 13 places further along in the alphabet, wrapping back to the beginning if necessary.[3] A becomes N, B becomes O, and so on up to M, which becomes Z, then the sequence continues at the beginning of the alphabet: N becomes A, O becomes B, and so on to Z, which becomes M. Only those letters which occur in the English alphabet are affected; numbers, symbols, whitespace, and all other characters are left unchanged. Because there are 26 letters in the English alphabet and 26 = 2 × 13, the ROT13 function is its own inverse:[3]
19
+
20
+{\displaystyle {\mbox{ROT}}_{13}({\mbox{ROT}}_{13}(x))=x} {\mbox{ROT}}_{13}({\mbox{ROT}}_{13}(x))=x for any basic Latin-alphabet text x.
21
+In other words, two successive applications of ROT13 restore the original text (in mathematics, this is sometimes called an involution; in cryptography, a reciprocal cipher).
22
+
23
+The transformation can be done using a lookup table, such as the following:
24
+
25
+Input	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
26
+Output	NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm
27
+For example, in the following joke, the punchline has been obscured by ROT13:
28
+
29
+```
30
+Why did the chicken cross the road?
31
+Gb trg gb gur bgure fvqr!
32
+```
33
+Transforming the entire text via ROT13 form, the answer to the joke is revealed:
34
+```
35
+Jul qvq gur puvpxra pebff gur ebnq?
36
+To get to the other side!
37
+```