criptoselu
v1.0.0
Published
Asymmetric encryption module
Downloads
2
Readme
Criptoselu
Asymmetric encryption module
Description
This module encrypts / decrypts based on the name of the machine and the user, allowing independent encryption per user on the same computer.
Getting started
Install
npm install https://gitlab.com/necrokaneda/criptoselu.git --save
In code:
const ModCript = require('Criptselu');
const cript = new ModCript();
If you change algorithm or length:
const ModCript = require('Criptselu');
const cript = new ModCript({algorithm: 'aes128', length: 32});
Remember :
| Algorithm | Key | iv | |----|----|-----| | aes128 | 16 byte (128 bits) | 16 byte (128 bits) | | aes-128-cbc | 16 byte (128 bits) | 16 byte (128 bits) | | aes192 | 24 byte (192 bits) | 16 byte (128 bits) | | aes256 | 32 byte (256 bits) | 16 byte (128 bits) |
Use
| Method | Description | Example |
| -------| -------- | --------|
| encrypt
| Encrypt word | cript.encrypt("Word")
|
| decrypt
| Decrypt word | cript.decrypt("Word")
|
Author
Jose Luís Entrena Dorado - ([email protected])