ssldec

1.0.1 • Public • Published

ssldec

Promise based SSL Encrypt/Decrypt using Private or Public Keys

Usage

let SSLdec = require('ssldec');
let crypt = new SSLdec();

crypt.setPrivateKey({
    path: '/path/to/cakey.pem'
});

crypt.encrypt('somedata').then(function(encrypted_string){ console.log(encrypted_string); 
    crypt.decrypt(encrypted_string).then(function(decrypted_buffer){ 
            console.log(decrypted_buffer.toString('utf8') );
    });
});

Credit

Based on recrypt

Package Sidebar

Install

npm i ssldec

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • lmangani