Last active
February 14, 2018 14:49
-
-
Save AndyNovo/95449c2c20553bd09469289fc0527747 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m="Hi there" | |
print m | |
hexstr = m.encode('hex') | |
print hexstr | |
integer_m = int(hexstr, 16) | |
print integer_m | |
back2hex = format(integer_m, 'x') | |
print back2hex | |
evenpad = ('0' * (len(back2hex) % 2)) + back2hex | |
plaintext = evenpad.decode('hex') | |
print plaintext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment