You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/enc/crypto.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,25 @@ It implements the cipher for its 4 different keys.
109
109
110
110
-----
111
111
112
+
### Beaufort Cipher
113
+
114
+
This is a variant of the [Vigenere Cipher](#vigenere-cipher). There is no default key, meaning that `beaufort` as the encoding scheme throws a `LookupError` indicating that the _key must be a non-empty alphabetic string_.
`trithemius` | text <-> Trithemius ciphertext | `trithemius`, `trithemius_cipher` |
231
+
232
+
```python
233
+
>>> codext.encode("This is a test !", "trithemius")
234
+
'Tikv mx g ambd !'
235
+
>>> codext.decode("Tikv mx g ambd !", "trithemius")
236
+
'This is a test !'
237
+
```
238
+
239
+
-----
240
+
205
241
### Vigenere Cipher
206
242
207
243
This is a dynamic encoding, that is, it holds the key. There is no default key, meaning that `vigenere` as the encoding scheme throws a `LookupError` indicating that the _key must be a non-empty alphabetic string_.
@@ -216,6 +252,7 @@ This is a dynamic encoding, that is, it holds the key. There is no default key,
216
252
>>> codext.encode("This is a test !", "vigenere_MySuperSecret")
217
253
'Ffam xw r liuk !'
218
254
>>> codext.decode("Tiit it a tfsu !", "vigenere-abababa")
0 commit comments