JSPM

secure-keys

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 765735
    • Score
      100M100P100Q192121F
    • License MIT

    Encrypt/Decrypt the values of a given object

    Package Exports

    • secure-keys

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (secure-keys) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    secure-keys

    build
status

    A simple module that encrypts/decrypts the keys of a given object

    install

    npm i secure-keys --save

    usage

    var SecK = require('secure-keys');
    
    var sec = new SecK({
      secret: 'BEGIN RSA', // Text of key used for encrypting/decrypting
      format: JSON, // optional (defaults to JSON): An object with `stringify` and `parse` methods
      alg: 'aes-256-ctr' //optional (this is default) Algorithm to use for encrypt/decrypt
    });
    
    var encryptedObj = sec.encrypt({
      myConfig: 'values',
      needTo: 'be safe'
    });
    
    var decryptedObj = sec.decrypt(encryptedObj);

    LICENSE

    MIT


    This code was yanked out of work by @indexzero for nconf