encrypto-object
v1.2.5
Published
Lib para criação de objetos criptografados
Downloads
12
Maintainers
Readme
Encrypto-object
Library for Encrypt payloads in Node.js, using built-in Node Native Crypto. Uses AES 256(GCM mode) cipher with simetric Cryptography.
Usage
$ npm i encrypto-object
- (Using typescript) Cryptograph payload and creating cryptogram:
import EncryptoObject from 'encrypto-object';
(async ()=>{
const cryptogram = await new EncryptoObject().setData({testing: "1234"}).serialize();
console.log(cryptogram)
// The console output will be something like: OHV6bGR0N1JNVDc4dDk0YnYwT0VlVGRxN2tqL3gxL3U3WWIrUmlScW5OVWVqZXUyMHBYeTJuUW03T3FJQ3JmNlZuWUdzWVQxemd4UUl4WWRGQ1kwSWE2ZWdUcGVCSXM9I0pNMi9aajYrUWxSRFBoNUVWUi92M1E9PSNMbTBTT1VZUmZBMWRuWGUwZE5US0ZBPT0
)();
- (Using typescript) Opening payload and creating instance:
import EncryptoObject from 'encrypto-object';
(async ()=>{
// cryptogram = OHV6bGR0N1JNVDc4dDk0YnYwT0VlVGRxN2tqL3gxL3U3WWI ...
const loader = await new CryptoObject().deserialize(cryptogram);
)();
More docs will be provided soon.
Run the tests
$ npm install -g jest
$ npm test
Contributing?
$ npm run lint
Owners
License
The MIT License