Cryptography: Difference between revisions
From charlesreid1
No edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
# 'Uryyb Jbeyq!' | # 'Uryyb Jbeyq!' | ||
</pre> | </pre> | ||
[[Category:Teaching]] | |||
Revision as of 01:05, 26 August 2016
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!'