js-caesarcipher 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/index.html +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ Add this script tag to your html code
|
|
|
9
9
|
|
|
10
10
|
# Useage
|
|
11
11
|
|
|
12
|
+
**Cipher the text**
|
|
13
|
+
|
|
12
14
|
Use the function `new CaesarCipher()`
|
|
13
15
|
|
|
14
16
|
Example: "Hello World", after shifting 2 letters will be "Jgnnq Yqtnf"
|
|
@@ -24,3 +26,20 @@ console.log(cipher.result);
|
|
|
24
26
|
|
|
25
27
|
* The `input` is unciphered plain text.
|
|
26
28
|
* The `shift` is shift how many letters.
|
|
29
|
+
|
|
30
|
+
**Decipher the text**
|
|
31
|
+
|
|
32
|
+
Use the function `CaesarCipher.deCipher()`
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
CaesarCipher.deCipher("Jgnnq Yqtnf", 2)
|
|
36
|
+
// The output will be "Hello World"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Crack ciphered text**
|
|
40
|
+
|
|
41
|
+
Use the function `CaesarCipher.crack()`
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
CaesarCipher.crack("Jgnnq Yqtnf")
|
|
45
|
+
```
|
package/index.html
CHANGED