定制 vakata/asn1 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vakata/asn1

最新稳定版本:2.3.3

Composer 安装命令:

composer require vakata/asn1

包简介

An ASN1 encoder / decoder

关键字:

README 文档

README

Latest Version on Packagist Software License Build Status Scrutinizer Code Quality Code Coverage

Am ASN1 encoder / decoder.

Install

Via Composer

$ composer require vakata/asn1

Usage

The main part of the library are the Decoder and Encoder classes.

// first create an instance (there is a fromFile static method as well)
$decoded = \vakata\asn1\Decoder::fromString("...ASN1 data here ...");
// you can then inspect the parsed raw data
$decoded->structure(); // more info
$decoded->values(); // just values
// or map the data to an existing map
$decoded->map($mapArray);

// the encoder on the otherhand needs some data and a map
\vakata\asn1\Encoder::encode($dataArray, $mapArray);

There are helper classes in the structures namespace - these help with working with common known structures. All the structures have fromString and fromFile static constructor methods, and a toArray method.

// Timestamp example:
\vakata\asn1\structures\TimestampRequest::fromString($tsq)->toArray();
\vakata\asn1\structures\TimestampResponse::fromFile('/path/to/timestamp/response')->toArray();
\vakata\asn1\structures\TimestampRequest::generateFromFile('/path/to/file/to/timestamp');
// You can also work with Certificate, CRL, OCSPRequest, OCSPResponse, P7S

Read more in the API docs

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email github@vakata.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 24.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 16
  • 点击次数: 1
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 16
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-20