Giter Site home page Giter Site logo

colour-keys's Introduction

Colour-Keys

Transforms a hexadecimal key into a colourful encoded image, and allows for reversal of the process to obtain the original key. This allows for a simple means of public key exchange, much like a .pub file, but more stylish (in my opinion).

How it works

make_keyimg() takes a string as input, such as: "2c349b1cbe1fe87546fcb28f35ee4b1674a0fbcaaea861da7c63ef224008b1e258354ffed963"

and produces an image like this:

Screenshot

extract_keyimg() does the reverse; it reads an image produced by make_keyimg() and returns a string containing the encoded public key.

Notes

  • The template image could be virtually anything; I wrote it with the ProjectTox messenger in mind, hence the logo and file extensions
  • This is only a proof of concept thrown together in a couple days, and as such may contain bugs.
  • One known bug/flaw is that a key where a pixel is made up of the background colour (e.g. #ffffff for a white background) will not be extracted correctly. Despite being over a 1 in a million chance, a special case must be made with key generation to ensure integrity.
  • The unit test can be used by running the command make

colour-keys's People

Contributors

jfreegman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

pigpog

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.