Code Monkey home page Code Monkey logo

cronos's Introduction

cronos

Python module for safely and cleanly using sensitive data in shared code.

Cronos uses a secure encryption method, AES256, to store passwords and sensitive values locally. Simple (and unsecure) Caesar Ciphers are used to create obfuscated keys in the cronos datastore. This means keys are simply human-unreadable and values are securely encrypted with a password file (defaults to your ssh public key).

Install

  • Python Pip: pip install cronos

Usage

While global keys are stored in your code (such as the plaintext API_KEY in the examples below), Cronos uses the single interface get to initially prompt the user for the value at runtime. Cronos stores the encrypted value in a keystore called db.cronos. Upon a second call to get, Cronos performs a lookup and decryption.

You may want to add *.cronos to your .gitignore.

Using mypassword.txt as the encryption key:

from cronos import Cronos
c = Cronos('mypassword.txt')
myKey = c.get("API_KEY")  # Prompt user for API_KEY if not already stored

Using id_rsa.pub as the default encryption key:

from cronos import Cronos
c = Cronos()
myKey = c.get("API_KEY")  # Prompt user for API_KEY if not already stored

Requirements

cronos's People

Contributors

jamshedvesuna avatar

Watchers

Marc Abramowitz avatar James Cloos avatar  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.