0.1.0 • Published 8 years ago

safetext v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

safetext

Node module allowing you to more safely store and use strings in node apps.

What's the point?

Storing, managing, accessing, etc. passwords is hard. Wouldn't it be great if there was a tool that allowed you to keep them in one place, safely?

safetext is a tool that does not only that, but provides facilities for your app to access these passwords easily, without causing you headache.

The whole idea here is that most of the time you have connection string variables, access tokens or keys, or other sensitive text that would be super convenient to store and access in plain text, but you really shouldn't do that per security best practices.

safetext allows you to create one file in your current working directory, that stores all of these for you, encrypted in json format. You first initialize the file, and can interact with it (adding, getting, removing, etc.) values. Once this is done, you are free to check the file into version control, and you will have access to these keys in your application using the safetext library.

For the command line tool for safetext, please visit here: safetext-cmd

What's the catch?

The bummer about this, is you still end up with one "master" password that everything can be accessed with. You still need to handle/protect this with care as anyone with it could decrypt your safetext file and get your private data.

Setting Up

Install this package into your project:

npm install safetext --save

Create the safetext file

Initialize a safetext file with a master password.

safetext.init( <master password> )

Note: after you execute this, you should see a safetext file in your working directory. Keep the master password in a safe place. Once you create this file, it's almost impossible to decrypt the file without the master.

API

Please refer to the below documentation on how to interact with the safetext api.

Get contents

Get the contents of the file decrypted, provided the master password.

safetext.getContents( <master password> )

Get keys

Gets an array of keys that are present in the file.

safetext.getKeys( <master password> )

Add a key

Adds a key to the safetext store.

safetext.writeKey( <key>, <value>, <master password> )

Get value by key

Gets a specific value by key.

safetext.getKey( <key>, <master password> )

Remove a value by key

Removes a specific value by key in the safetext file.

safetext.removeKey( <key>, <master password> )

Change master password

Changes the master password of the safetext file.

safetext.changePassword( <master password>, <new password>, <new password confirm> )

Using in your app

Once you've created your safetext file in your project, it's ready to use in your application.

You can access the contents of your file through the safetext api like this:

// safestore.js
var safetext = require('safetext');
var safestore = safetext.getContents('pw');
module.exports = safestore;
0.1.0

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago