# pkcs7
[![Build Status](https://travis-ci.org/brightcove/pkcs7.svg?branch=master)](https://travis-ci.org/brightcove/pkcs7)
[![Greenkeeper badge](https://badges.greenkeeper.io/brightcove/pkcs7.svg)](https://greenkeeper.io/)
[![Slack Status](http://slack.videojs.com/badge.svg)](http://slack.videojs.com)
[![NPM](https://nodei.co/npm/pkcs7.png?downloads=true&downloadRank=true)](https://nodei.co/npm/pkcs7/)
> Add and remove pkcs7-style padding.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Getting Started](#getting-started)
- [Documentation](#documentation)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Getting Started
Install the module with: `npm install pkcs7`
```js
var pkcs7 = require('pkcs7'), encrypted;
// pad a buffer!
enctcrypted = encrypt(pkcs7.pad(buffer));
// later, you can unpad it:
console.log('the secret is out! ' + pkcs7.unpad(decrypt(encrypted)));
```
Install with cli command
```sh
$ npm install -g pkcs7
$ pkcs7 --help
$ pkcs7 --version
```
## Documentation
PKCS#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:
01 -- if lth mod k = k-1
02 02 -- if lth mod k = k-2
.
.
.
k k ... k k -- if lth mod k = 0
`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).
## Examples
You can run pkcs7 from the command line:
```shell
# pad a string generated by echo and the hex dump the result
echo -n "0123456789AB" | pkcs7 | xxd
```
## Contributing
In 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).
## License
Copyright (c) 2014 Brightcove
Licensed under the Apache-2 license.
没有合适的资源?快使用搜索试试~ 我知道了~
AST反混淆js还原工具2.3(20231219)
共302个文件
js:256个
md:14个
json:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 20 下载量 14 浏览量
2023-12-19
17:18:18
上传
评论 4
收藏 244KB ZIP 举报
温馨提示
反混淆工具主要实现的目的 1.尽量保证原来js文件的可执行性 2.反混淆后尽量接近源码的可读性 介绍 01 功能优化:删除if中的假分支,修改不兼容的部分 02 新增功能:对解密函数的二次封装,提取所有二次封装的函数名称,然后解密 03 try-catch优化为try-catch-finally简化 04 辅助功能-return简写表达式还原,便于阅读理解 05 新增:大数组多解密函数(需要先自行排版,大数组-偏移函数-解密函数1-解密函数2-解密函数3) 06 修复bug-未修改常量替换,异常删除与异常替换的情况,对未赋值的增加undefined初始化处理 07 修复bug-未使用标识符简化,对于function函数的bug处理 function o(o,j){},因参数o未使用,而删除函数o的bug处理 08 优化序列表达式还原,支持更多的场景,存在bug 已修复 09 修复bug-数组简化
资源推荐
资源详情
资源评论
收起资源包目录
AST反混淆js还原工具2.3(20231219) (302个子文件)
pkcs7.cmd 321B
.eslintrc 435B
index.html 214B
demo.js 59KB
ObDecryMain.js 57KB
ObDecryFuMain.js 56KB
runtime.js 25KB
test-document.js 18KB
decorate.js 13KB
decorate.js 13KB
regeneratorRuntime.js 11KB
regeneratorRuntime.js 11KB
applyDecs.js 8KB
applyDecs.js 8KB
applyDecs2301.js 7KB
test-dom-element.js 7KB
applyDecs2301.js 7KB
applyDecs2305.js 6KB
applyDecs2305.js 6KB
applyDecs2203R.js 6KB
test.js 6KB
applyDecs2203.js 6KB
applyDecs2203R.js 6KB
applyDecs2203.js 6KB
dom-element.js 6KB
browser.js 5KB
serialize.js 3KB
document.js 2KB
pkcs7.js 2KB
wrapRegExp.js 2KB
AsyncGenerator.js 2KB
pkcs7.cjs.js 2KB
wrapRegExp.js 2KB
AsyncGenerator.js 2KB
pkcs7.es.js 2KB
pkcs7.pad.js 2KB
asyncIterator.js 2KB
createForOfIteratorHelper.js 1KB
pkcs7.test.js 1KB
asyncIterator.js 1KB
interopRequireWildcard.js 1KB
createForOfIteratorHelper.js 1KB
pad.js 1KB
set.js 1KB
interopRequireWildcard.js 1KB
test-adapter.js 1KB
wrapNativeSuper.js 1KB
set.js 1KB
index.js 1KB
cli.js 1KB
wrapNativeSuper.js 1KB
dispose.js 978B
pkcs7.min.js 923B
rollup.config.js 919B
objectSpread2.js 919B
applyDecoratedDescriptor.js 902B
construct.js 902B
dispose.js 888B
createForOfIteratorHelperLoose.js 882B
asyncToGenerator.js 879B
dom-fragment.js 876B
asyncGeneratorDelegate.js 841B
get.js 830B
jsx.js 821B
objectSpread2.js 820B
createClass.js 816B
pkcs7.pad.min.js 803B
applyDecoratedDescriptor.js 795B
iterableToArrayLimit.js 790B
createSuper.js 781B
asyncToGenerator.js 780B
createForOfIteratorHelperLoose.js 766B
pkcs7.unpad.js 759B
defineEnumerableProperties.js 755B
objectWithoutProperties.js 741B
asyncGeneratorDelegate.js 733B
dom-text.js 720B
createClass.js 719B
jsx.js 717B
objectSpread.js 710B
classStaticPrivateFieldDestructureSet.js 692B
iterableToArrayLimit.js 687B
createSuper.js 678B
classStaticPrivateFieldSpecSet.js 668B
inherits.js 658B
defineEnumerableProperties.js 646B
classStaticPrivateFieldSpecGet.js 645B
using.js 640B
test-dom-comment.js 636B
objectWithoutProperties.js 632B
dispatch-event.js 625B
construct.js 614B
objectSpread.js 612B
unsupportedIterableToArray.js 607B
extends.js 601B
classApplyDescriptorDestructureSet.js 572B
inherits.js 564B
classStaticPrivateFieldDestructureSet.js 563B
toPrimitive.js 561B
get.js 551B
共 302 条
- 1
- 2
- 3
- 4
jia666666
- 粉丝: 1w+
- 资源: 33
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页