Skip to content

fmolliet/encrypto-object

Repository files navigation

Encrypto-object

Library for Encrypt payloads in Node.js, using built-in Node Native Crypto. Uses AES 256(GCM mode) cipher with simetric Cryptography.

Language Vulnerabiliy Size Issues Downloads

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published