# kruptos

> Tool to encrypt and decrypt node.js files and modules

Latest version **0.0.3** (published 2013-02-11) · 0 weekly downloads

## Install

```sh
npm install kruptos
pnpm add kruptos
yarn add kruptos
bun add kruptos
```

Provides the command `kruptos`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2013-02-11 |
| First published | 2013-02-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Olivier Penhoat |
| Maintainers | openhoat |

## Links

- npm: https://www.npmjs.com/package/kruptos
- Repository: https://github.com/openhoat/kruptos
- Issues: https://github.com/openhoat/kruptos/issues
- npm.io page: https://npm.io/package/kruptos

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) 0.6.0-1
- [commander](https://npm.io/package/commander.md) 0.6.1

## Recent versions

- 0.0.3 (latest) — 2013-02-11
- 0.0.2 — 2013-02-11
- 0.0.1 — 2013-02-10

## README

## What's kruptos ?

- Encrypt and decrypt node files with a simple command-line
- Provides a wrapper to 'require' encrypted node modules (overrides the standard node Module class)

## Goal

- Encrypt node project files with a secret key
- Easily execute an application that contains encrypted files without the need to decrypt the files before
- Just pass the good '--key' argument to node when launching the app

## Installation

The recommended way is through the excellent [NPM](http://www.npmjs.org/):

    $ npm install -g kruptos

## Command line usage

Encrypt demo/module1.js and demo/module2.js with 'mysecretkey' key :

    $ kruptos -e -k mysecretkey demo/module*.js

Decrypt demo/module1.js.encrypted and demo/module2.js.encrypted with 'mysecretkey' key :

    $ kruptos -d -k mysecretkey demo/module*.encrypted

## Module require usage

Simply add the kruptos module at the top of your main script (app.js for example) :

    require('kruptos');

Run application as usual :

    $ node app

Run application and encrypt all module dependencies :

    $ node app --encrypt --key mysecretkey

Run application directly with encrypted module dependencies :

    $ node app --key mysecretkey

Run application and decrypt all module dependencies :

    $ node app --decrypt --key mysecretkey

## Demo

Use the samples provided in the [demo directory](https://github.com/openhoat/kruptos/tree/master/demo).

There are two encrypted modules based on [sources directory](https://github.com/openhoat/kruptos/tree/master/demo/sources).

Try to execute the main script, and see how it works :

    $ node demo/main --key demokey

To decrypt the modules during the execution :

    $ node demo/main --decrypt --key demokey

To encrypt the modules during the execution :

    $ node demo/main --encrypt --key demokey


Enjoy !

---
_Source: https://npm.io/package/kruptos · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
