Giter Site home page Giter Site logo

onetime's Introduction

One Time Pad Codec

One-time pad encryption is a theoretically uncrackable encryption method based on a shared random key.

This codec can be used in three ways:

  1. Include the class in your own code (onetime.py).
  2. Use the codec from the command line (onetime.py).
  3. Use the GUI (onetime_gui.py)

Running from the command line

# Encode a string
$ python onetime.py enc 'Hello, World!' 'my secret key'
> TC#Ds!}0H}vh

# Decode a string
$ python onetime.py dec 'TC#Ds!}0H}vh' 'my secret key'
> Hello, World!

# Provide a custom alphabet
$ python onetime.py enc 'Hello, World!' 'my secret key' 'abcdefghijklmnopqrstuvwxyz1234567890'
> m3l4scre8rvhy

Running the GUI

$ python onetime_gui.py

Creating windows exe

To create an EXE first make sure python is in your PATH environment variable.

Then install py2exe.

Finally put this in your command line:

python onetime_gui.py py2exe

The exe and accompanying files will be created in /dist.

onetime's People

Contributors

mrchimp avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.