@emartech/easy-crypto
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -5,2 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "1.1.0", | ||
"scripts": { | ||
@@ -40,4 +41,3 @@ "test": "mocha --require co-mocha **/*.spec.js", | ||
"validate-commit-message": "3.0.1" | ||
}, | ||
"version": "1.0.3" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# node-easy-crypto [ ![Codeship Status for emartech/node-easy-crypto](https://codeship.com/projects/7d506d70-f446-0133-ee01-62576cc16050/status?branch=master)](https://codeship.com/projects/150039) [![Depedencies](https://david-dm.org/emartech/node-easy-crypto.svg)](https://david-dm.org/emartech/node-easy-crypto) [![Dev depedencies](https://david-dm.org/emartech/node-easy-crypto/dev-status.svg)](https://david-dm.org/emartech/node-easy-crypto#info=devDependencies&view=table) | ||
# node-easy-crypto [ ![Codeship Status for emartech/node-easy-crypto](https://codeship.com/projects/0baf8660-f4ea-0133-b502-5ef57cbd419a/status?branch=master)](https://codeship.com/projects/150193) [![Depedencies](https://david-dm.org/emartech/node-easy-crypto.svg)](https://david-dm.org/emartech/node-easy-crypto) [![Dev depedencies](https://david-dm.org/emartech/node-easy-crypto/dev-status.svg)](https://david-dm.org/emartech/node-easy-crypto#info=devDependencies&view=table) | ||
Provides simple wrappers around Node's crypto implementation. | ||
@@ -23,3 +23,3 @@ | ||
### Initialization | ||
There aren't too many options you can change and that's on purpose. This small wrapper library is secure by default. You can change two configurations: `passwordSaltSize`, `iterationCount` by passing them to the function as follows: | ||
There aren't too many options you can change and that's on purpose. This small wrapper library is secure by default. You can change two configurations: `passwordSaltSize`, `iterationCount` by passing them to the initialization function as follows: | ||
```js | ||
@@ -38,3 +38,3 @@ let ecrypto = require('easy-crypto')(12, 10000); // parameters are in order: passwordSaltSize, iterationCount | ||
### encryptAsync(`password`, `plaintext`) -> `ciphertext` | ||
`password` should be any normal string. It will be used to generate the encryption key. `plaintext` must be `utf-8` encoded string. It will be converted to `bytes` and those will be used for the cryptographic operations. The output of this operations is `base64` encoded buffers. This will be used as the input of the `decryptAsync` operation. | ||
`password` should be any normal string. It will be used to generate the encryption key. `plaintext` must be `utf-8` encoded string. It will be "converted" to `bytes` and those will be used for the cryptographic operations. The output of this operations is `base64` encoded buffers. This will be used as the input of the `decryptAsync` operation. | ||
@@ -45,3 +45,3 @@ ### decryptAsync(`password`, `ciphertext`) -> `plaintext` | ||
## The crypto parts | ||
The library is only a thin wrapper of node's own `crypto` module. It uses well known and battle tested encryption techniques. It is provide a convenient wrapper around these functions, taking away details of using encryption correctly. Feel free to explore the source. | ||
The library is only a thin wrapper of node's own `crypto` module. It uses well known and battle tested encryption techniques. It provides a convenient wrapper around these functions, taking away the details of using encryption correctly. Feel free to explore the source! | ||
@@ -48,0 +48,0 @@ ### Encryption process |
16041