Skip to content

Instantly share code, notes, and snippets.

@alopresto
Created February 17, 2017 05:27
Show Gist options
  • Save alopresto/cb6e2202ba700557d2d05b0e77bcf901 to your computer and use it in GitHub Desktop.
Save alopresto/cb6e2202ba700557d2d05b0e77bcf901 to your computer and use it in GitHub Desktop.
Results of running a toy Python crypto example.
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 6s @ 21:25:02 $ echo "This is a plaintext message." > plain.txt
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 4s @ 21:25:07 $ ./lightweight_crypto.py plain.txt output.enc
(E)ncrypt or (D)ecrypt?
E
done
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 12s @ 21:25:20 $ more output.enc
"output.enc" may be a binary file. See it anyway?
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 5s @ 21:25:26 $
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 0s @ 21:25:27 $ xxd output.enc
0000000: 6e95 d903 d016 0549 13e6 b567 1e50 27ad n......I...g.P'.
0000010: 01ed e46f d651 fd7c 2927 14a6 15ff 13ee ...o.Q.|)'......
0000020: 6a4d b8b7 7e61 c962 jM..~a.b
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 5s @ 21:25:33 $ ./lightweight_crypto.py output.enc recovered.txt
(E)ncrypt or (D)ecrypt?
D
done
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 13s @ 21:25:47 $ more recovered.txt
This is a plaintext message.
hw12203:/Users/alopresto/Workspace/lightweight_crypto (master) alopresto
πŸ”“ 3s @ 21:25:51 $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment