Giter Club home page Giter Club logo

bubblizator's Introduction

Bubblizator

Bubblizator is a symmetric-key algorithm which creates a bubble ciphertext.

Just see an example:

var bubblizator = new Bubblizator();

bubblizator.encode('This is a secret message !', 'my-secret');

/* Output:
80°08°8OO000.:O0.°0.0:@8O:°@0:OO@°8
::8o8808@o@°:OOoO@:oOo°O°o:o°:o°@0°
*/

bubblizator.decode('80°08°8OO000.:O0.°0.0:@8O:°@0:OO@°8::8o8808@o@°:OOoO@:oOo°O°o:o°:o°@0°', 'my-secret');

/* Output:
This is a secret message !
*/

Installation

Using Bower:

bower install bubblizator

Then add in your template:

<script type="text/javascript" src="bower_components/bubblizator/hash/sha512.min.js"></script>
<script type="text/javascript" src="bower_components/bubblizator/bubblizator.js"></script>

Usage

Default usage

var bubblizator = new Bubblizator();

bubblizator.encode('This is a secret message !', 'my-secret');

bubblizator.decode('80°08°8OO000.:O0.°0.0:@8O:°@0:OO@°8::8o8808@o@°:OOoO@:oOo°O°o:o°:o°@0°', 'my-secret');

Using different key between encoding and decoding won't work.

Using another charset

You can use another charset than bubbles. A charset is 8 characters used for ciphertext. It also supports an UTF-8 charset.

Just pass a charset option to bubblizator (string of 8 chars):

var bubblizator = new Bubblizator({
    charset: '♩♪♫♬♭♮♯°' // a Solfeggizator
});

bubblizator.encode('You touch my tralala', 'mydingdingdong');

/* Output:
♬♩♬♪♬♭♭°°♮♬♮°♫♭♪♭♭♫°°°♪°♭°♯♪♫♫♩♭♮°♩♮♫♮♯♪♯°♩♭°♭♮♮♩♫°♩♭♩
*/

License

This library is under MIT License.

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.