Cryptography: Difference between revisions
From charlesreid1
(Created page with "Notes on crypto stuff. PyOTP: https://labix.org/python-otp") |
Bleep bloop (talk | contribs) m (Bot: Orphan page, add template) |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{Orphan|date=April 2017}} | |||
Notes on crypto stuff. | Notes on crypto stuff. | ||
PyOTP: https://labix.org/python-otp | PyOTP: https://labix.org/python-otp | ||
ROT and other replacement ciphers: | |||
<pre> | |||
import string | |||
rot13 = string.maketrans( | |||
"ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz", | |||
"NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm") | |||
string.translate("Hello World!", rot13) | |||
# 'Uryyb Jbeyq!' | |||
</pre> | |||
[[Category:Teaching]] | |||
Latest revision as of 02:39, 17 April 2017
| O NOES!!!
|
Notes on crypto stuff.
PyOTP: https://labix.org/python-otp
ROT and other replacement ciphers:
import string
rot13 = string.maketrans(
"ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz",
"NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm")
string.translate("Hello World!", rot13)
# 'Uryyb Jbeyq!'