Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A hacky implementation of One-time pad

Project Description

One-Time-Pad Python is a command-line encryption tool, which uses an encryption mechanism very similar to One-time Pad (Duh. Thanks for telling that)


Install it using pip:

$ pip install onetimepad


To use it from the command-line, run:

$ onetimepad

Or, import the onetimepad module in your script:

#!/usr/bin/env python3

import onetimepad

cipher = onetimepad.encrypt('some text', 'a_random_key')
msg = onetimepad.decrypt(cipher, 'a_random_key')


  1. The crypted message is very easy to crack if the length of key is less than the length of message.
  2. In any case, the key is not nescessarily random, which makes this tool as good as a toy.
  3. Thus, do not encrypt any real private stuff, it won’t protect you from the NSA. It is just a hack.


This project is licensed under the terms of MIT LICENSE, please see LICENSE file for more details.

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
onetimepad-1.4.tar.gz (3.3 kB) Copy SHA256 Checksum SHA256 Source Aug 10, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting