{"name":"pkcs7","version":"0.2.2","keywords":["pkcs7","pkcs7 encrypt decrypt padding pkcs"],"author":{"name":"Brightcove"},"license":"Apache2","_id":"pkcs7@0.2.2","maintainers":[{"name":"dmlap","email":"dlapalomento@gmail.com"}],"homepage":"https://github.com/brightcove/pkcs7","bugs":{"url":"https://github.com/brightcove/pkcs7/issues"},"bin":{"pkcs7":"lib/cli.js"},"dist":{"shasum":"e05e72b8a86c0578b6c377dcc893751de2dae5c4","tarball":"http://registry-npm.ywwl.com/pkcs7/download/pkcs7-0.2.2.tgz","integrity":"sha512-BRsrWcG6LgYehy85NJVmehTya/vGiKVWAVdrMT8YEChzcGiOUOnh67bXTKeNOAgURPTl9eaxZ4O4VrR4+ALzgg==","signatures":[{"sig":"MEUCIQCoUEALsBSJrUL2J/CRZk7QbWSvbr1S+Wj04TbljrVHmwIgAfqcb4+Z0iiZbQz1gS+MnLLBLLarYLQf6DgXb8hkfYA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":3996,"noattachment":false,"key":"/pkcs7/-/pkcs7-0.2.2.tgz"},"main":"lib/pkcs7.js","_from":".","files":["lib","dist"],"engines":{"npm":"^1.4.6","node":"^0.10"},"scripts":{"test":"grunt"},"_npmUser":{"name":"dmlap","email":"dlapalomento@gmail.com"},"repository":{"url":"https://github.com/brightcove/pkcs7","type":"git"},"_npmVersion":"1.4.6","description":"Add and remove pkcs7-style padding.","directories":{},"devDependencies":{"time-grunt":"^0.3.1","jshint-stylish":"^0.2.0","grunt-browserify":"^2.1.4","load-grunt-tasks":"^0.4.0","grunt-contrib-watch":"^0.6.1","grunt-contrib-jshint":"^0.10.0","grunt-contrib-nodeunit":"^0.3.3"},"readme":"# pkcs7\n\n[![Build Status](https://travis-ci.org/brightcove/pkcs7.svg?branch=master)](https://travis-ci.org/brightcove/pkcs7)\n[![Greenkeeper badge](https://badges.greenkeeper.io/brightcove/pkcs7.svg)](https://greenkeeper.io/)\n[![Slack Status](http://slack.videojs.com/badge.svg)](http://slack.videojs.com)\n\n[![NPM](https://nodei.co/npm/pkcs7.png?downloads=true&downloadRank=true)](https://nodei.co/npm/pkcs7/)\n\n> Add and remove pkcs7-style padding.\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Getting Started](#getting-started)\n- [Documentation](#documentation)\n- [Examples](#examples)\n- [Contributing](#contributing)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Getting Started\n\nInstall the module with: `npm install pkcs7`\n\n```js\nvar pkcs7 = require('pkcs7'), encrypted;\n// pad a buffer!\nenctcrypted = encrypt(pkcs7.pad(buffer));\n\n// later, you can unpad it:\nconsole.log('the secret is out! ' + pkcs7.unpad(decrypt(encrypted)));\n```\n\nInstall with cli command\n\n```sh\n$ npm install -g pkcs7\n$ pkcs7 --help\n$ pkcs7 --version\n```\n\n## Documentation\n\nPKCS#7 padding a really simple transformation some crytographic algorithms use to ensure the number of input bytes is a multiple of some constant. Here's how it works:\n\n             01 -- if lth mod k = k-1\n          02 02 -- if lth mod k = k-2\n              .\n              .\n              .\n    k k ... k k -- if lth mod k = 0\n\n`k` is the constant value the encryption algorithm wants your input to be a multiple of. This project assumes `k` is *always* sixteen. Not much to it, right? If reading specs is your thing, check out [RFC 5652](http://tools.ietf.org/html/rfc5652).\n\n\n## Examples\n\nYou can run pkcs7 from the command line:\n\n```shell\n# pad a string generated by echo and the hex dump the result\necho -n \"0123456789AB\" | pkcs7 | xxd\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com).\n\n\n## License\n\nCopyright (c) 2014 Brightcove\nLicensed under the Apache-2 license.\n","publish_time":1406930419640,"_cnpm_publish_time":1406930419640,"dist-tags":{"experimental":"1.0.3","latest":"1.0.4","next":"1.0.3-1"}}