Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cryptostache

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cryptostache

A simple encryptor with a fancy mustache-shaped barcode output

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cryptostache

A short 2-sided encryption script that can turn your strings/ product keys into mustache-shaped bar codes!

Installation

  1. You need to make sure that Cairo is installed on your system. The platform-specific guides can be found here: https://github.com/Automattic/node-canvas/wiki/_pages

  2. Install the cryptostache package

    $ npm install cryptostache --save

Usage

var cryptostache = require('cryptostache');

var product_code = new cryptostache('some_product_code', 'secret_key');

console.log(product_code.value);
//The encoded product code (Hex string)

console.log(product_code.barcode());
//The base64 image data for your shiny new barcode :D

Customization

  1. You can specify the mask to use to create other shapes of barcode !

    product_code.template = (your base64 mask data);

  2. You can specify the color for the bars. (background is transparent)

    product_code.barcode('red');

TODO

  1. Finish masking

  2. Add better tests

  3. Document ideal template sizes

  4. Docs

  5. Optimize drawing (should be under 16ms)

Why?

Why not?

Keywords

FAQs

Package last updated on 01 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc