Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asn1js

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asn1js - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

org/pkijs/common.js

@@ -197,3 +197,3 @@ /*

var str = int_buffer[i].toString(16).toUpperCase();
result = result + ((str.length === 1) ? " 0" : " ") + str;
result = result + ((str.length === 1) ? "0" : "") + str;
}

@@ -200,0 +200,0 @@

@@ -8,3 +8,3 @@ {

"description": "ASN1js is a pure JavaScript library implementing this standard. ASN.1 is the basis of all X.509 related data structures and numerous other protocols used on the web",
"version": "1.0.1",
"version": "1.0.2",
"repository": {

@@ -11,0 +11,0 @@ "type": "git",

@@ -130,2 +130,42 @@ ## ASN1js

## How to use ASN1js and PKIjs with Node.js
!!! WARNING !!!
Currently there is no "polyfill" of WebCrypto in Node.js. Thus you will not be able to use signature / verification features of PKIjs in Node.js programs.
In order to use PKIjs you will also need [ASN1js][] plus [node.extend](https://www.npmjs.com/package/node.extend) package.
```javascript
var merge = require("node.extend");
var common = require("asn1js/org/pkijs/common");
var _asn1js = require("asn1js");
var _pkijs = require("pkijs");
var _x509schema = require("pkijs/org/pkijs/x509_schema");
// #region Merging function/object declarations for ASN1js and PKIjs
var asn1js = merge(true, _asn1js, common);
var x509schema = merge(true, _x509schema, asn1js);
var pkijs_1 = merge(true, _pkijs, asn1js);
var pkijs = merge(true, pkijs_1, x509schema);
// #endregion
```
After that you will ba able to use ASN1js and PKIjs via common way:
```javascript
// #region Decode and parse X.509 cert
var asn1 = pkijs.org.pkijs.fromBER(certBuffer);
var cert;
try
{
cert = new pkijs.org.pkijs.simpl.CERT({ schema: asn1.result });
}
catch(ex)
{
return;
}
// #endregion
```
## License

@@ -132,0 +172,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc